Index: branch/KIS/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/KIS/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 709)
+++ branch/KIS/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 710)
@@ -8,7 +8,7 @@
 "" 
 [GENERAL_DATA]
 "FIRST_CONNECTION_TAG" "NO" 
-"MRULABELS_DATAMANAGER_KEY" "FE0000|FE0301|FE02F0|FE02DF|FE02F1|FE02EC|FE02E7|FE02EB|FE02F8|FE0002" 
+"MRULABELS_DATAMANAGER_KEY" "FE0000|FE0312|FE02FE|FE0301|FE02F0|FE02DF|FE02F1|FE02EC|FE02E7|FE02EB|FE02F8|FE0002" 
 "RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" 
@@ -48,7 +48,7 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRCtrlViews" "0" 
 "{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" "000000000000007F" 
+"{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" 
@@ -56,12 +56,12 @@
 "{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" "0000000000000400" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0369" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE02FE" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000006FE" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000A02" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000A0" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000081" 
 "{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" 
@@ -113,7 +113,9 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "t, 2, 0, P, Col, Bin, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Global," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "1" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "touche, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "2" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "150" 
Index: branch/KIS/sp4b1/SP4b1/SP4b1.c
===================================================================
--- branch/KIS/sp4b1/SP4b1/SP4b1.c	(revision 709)
+++ branch/KIS/sp4b1/SP4b1/SP4b1.c	(revision 710)
@@ -29,60 +29,60 @@
 		{
 			p10=0xEF; // colonne de droite a 0
 			t=p10;	
-			if (t == 0xEB) //une touche est apuyee
+			if (t == 0xEB) //la touche 7 est apuyee
 			{	
 				touche='7';
 			}
-			if (t == 0xE7) //une touche est apuyee
+			if (t == 0xE7) //la touche * est apuyee
 			{	
 				touche='*';
 			}
 			
 			p10=0x7F; // colonne du milieu a 0
-			t=p10;
-			if (t == 0x7E) //une touche est apuyee
+			t=p10;	
+			if (t == 0x7E) //la touche 3 est apuyee
 			{	
 				touche='3';
 			}
-			if (t == 0x7D) //une touche est apuyee
+			if (t == 0x7D) //la touche 6 est apuyee
 			{	
 				touche='6';
 			}
-			if (t == 0x7B) //une touche est apuyee
+			if (t == 0x7B) //la touche 9 est apuyee
 			{	
 				touche='9';
 			}
-			if (t == 0x77) //une touche est apuyee
+			if (t == 0x77) //la touche # est apuyee
 			{	
 				touche='#';
 			}
 			
 			p10=0xDF; // colonne du milieu a 0
-			t=p10;
-			if (t == 0xDE) //une touche est apuyee
+			t=p10;	
+			if (t == 0xDE) //la touche 2 est apuyee
 			{	
 				touche='2';
 			}
-			if (t == 0xDD) //une touche est apuyee
+			if (t == 0xDD) //la touche 5 est apuyee
 			{	
 				touche='5';
 			}
-			if (t == 0xDB) //une touche est apuyee
+			if (t == 0xDB) //la touche 8 est apuyee
 			{	
 				touche='8';
 			}
-			if (t == 0xD7) //une touche est apuyee
+			if (t == 0xD7) //la touche 0 est apuyee
 			{	
 				touche='0';
 			}
 			
 			p10=0xBF; // colonne de gauche a 0
-			t=p10;
-			if (t == 0xBE) //une touche est apuyee
+			t=p10;	
+			if (t == 0xBE) //la touche 1 est apuyee
 			{	
 				touche='1';
 			}
-			if (t == 0xBD) //une touche est apuyee
+			if (t == 0xBD) //une touche 4 est apuyee
 			{	
 				touche='4';
 			}
Index: branch/KIS/sp4a12/main.c
===================================================================
--- branch/KIS/sp4a12/main.c	(revision 709)
+++ branch/KIS/sp4a12/main.c	(revision 710)
@@ -8,8 +8,17 @@
 float longitude;
 float latitude;
 } Position ;
+
+typedef struct {
+ Position rpos;
+ float vitmax;
+ } Zone ;
+
+ Zone zones[] = {
+ {{44.7887762, -3.012}, 50}, /* Descripteur de la première zone */
+ {{44.7891220, -3,013}, 70}
+};
 
-
 //Trames de tests à modifier si nécessaire.
 char * trames[]=  {"$GPGSV,3,2,10,15,03,077,,18,04,041,42,19,85,271,,20,08,214,*7C",
                     "$GPGSV,3,3,10,22,39,053,50,28,15,320,*7E",
@@ -207,10 +216,29 @@
 {
     float v = 0;
 
-    v = calcule_distance(p_1, p_2)*3,6;  // vitesse en km/h
+    v = 3.6 * calcule_distance(p_1,p_2);
 
     return v;
 }
+
+float distance_a_la_plus_proche_zone(Position p,Zone r[],int nb_zones,float *d)
+{
+    float k=0, i=0, j=9999999;
+
+    for (i=0; i<nb_zones; i++)
+    {
+        k=calcule_distance(p, r[i].rpos);
+
+        if (k<j)
+        {
+            j=k;
+        }
+    }
+
+    printf("distance entre le vehicule et la zone dangereuse la plus proche : ");
+    printf("%f",k);
+    return j; //retourne la plus petite distance
+}
 
 //Fonction à modifier !!!!!
 void traitement(char * trame)
@@ -314,4 +342,3 @@
 
     return 0;
 }
-
Index: branch/KIS/sp4b2/SP4b2/SP4b2.hwp
===================================================================
--- branch/KIS/sp4b2/SP4b2/SP4b2.hwp	(revision 709)
+++ branch/KIS/sp4b2/SP4b2/SP4b2.hwp	(revision 710)
@@ -3,16 +3,16 @@
 [DATABASE_VERSION]
 "2.8" 
 [PROJECT_DETAILS]
-"SP4b2" "C:\TP_SP4\sp4b2\SP4b2" "C:\TP_SP4\sp4b2\SP4b2\SP4b2.hwp" "M16C/80,M32C" "Renesas M32C Standard" "Application" "M32C/80" "M32C/87(M32C/87B)" 
+"SP4b2" "D:\TP_SP4_KIS\sp4b2\SP4b2" "D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.hwp" "M16C/80,M32C" "Renesas M32C Standard" "Application" "M32C/80" "M32C/87(M32C/87B)" 
 [INFORMATION]
 "No project information available" 
 [TOOL_CHAIN]
 "Renesas M32C Standard Toolchain" "5.42.00" 
 [CONFIGURATIONS]
-"Debug" "C:\TP_SP4\sp4b2\SP4b2\Debug" 
-"Debug_M32C_E8a_SYSTEM" "C:\TP_SP4\sp4b2\SP4b2\Debug_M32C_E8a_SYSTEM" 
-"Debug_M32C_Simulator" "C:\TP_SP4\sp4b2\SP4b2\Debug_M32C_Simulator" 
-"Release" "C:\TP_SP4\sp4b2\SP4b2\Release" 
+"Debug" "D:\TP_SP4_KIS\sp4b2\SP4b2\Debug" 
+"Debug_M32C_E8a_SYSTEM" "D:\TP_SP4_KIS\sp4b2\SP4b2\Debug_M32C_E8a_SYSTEM" 
+"Debug_M32C_Simulator" "D:\TP_SP4_KIS\sp4b2\SP4b2\Debug_M32C_Simulator" 
+"Release" "D:\TP_SP4_KIS\sp4b2\SP4b2\Release" 
 [BUILD_PHASES]
 "Renesas M32C Assembler" 1 
 "Renesas M32C C Compiler" 1 
@@ -105,8 +105,8 @@
 "Relocatable file" "Renesas M32C Linker" "Renesas M32C Assembler" 
 "Relocatable file" "Renesas M32C Linker" "Renesas M32C C Compiler" 
 [PROJECT_FILES]
-"C:\TP_SP4\sp4b2\SP4b2\SP4b2.c" "User" "C source file" 2 
-"C:\TP_SP4\sp4b2\SP4b2\ncrt0.a30" "User" "Assembly source file" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.c" "User" "C source file" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\ncrt0.a30" "User" "Assembly source file" 2 
 [FOLDER]
 "Assembly source file" "Assembly source file" 
 "C source file" "C source file" 
@@ -115,18 +115,18 @@
 [ON_DEMAND_COMPONENTS_LOADED]
 [SYNC_SESSION_NAMES]
 [SESSIONS]
-"DefaultSession" "C:\TP_SP4\sp4b2\SP4b2\DefaultSession.hsf" 0 
-"SessionM32C_E8a_SYSTEM" "C:\TP_SP4\sp4b2\SP4b2\SessionM32C_E8a_SYSTEM.hsf" 0 
-"SessionM32C_Simulator" "C:\TP_SP4\sp4b2\SP4b2\SessionM32C_Simulator.hsf" 0 
+"DefaultSession" "D:\TP_SP4_KIS\sp4b2\SP4b2\DefaultSession.hsf" 0 
+"SessionM32C_E8a_SYSTEM" "D:\TP_SP4_KIS\sp4b2\SP4b2\SessionM32C_E8a_SYSTEM.hsf" 0 
+"SessionM32C_Simulator" "D:\TP_SP4_KIS\sp4b2\SP4b2\SessionM32C_Simulator.hsf" 0 
 [GENERAL_DATA_SESSION_DefaultSession]
 [GENERAL_DATA_SESSION_SessionM32C_E8a_SYSTEM]
 [GENERAL_DATA_SESSION_SessionM32C_Simulator]
 [OPTIONS_Debug_Renesas M32C Assembler]
 "Assembly source file" "056a321d6a357d10" 2 
-"C:\TP_SP4\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
 [OPTIONS_Debug_Renesas M32C C Compiler]
 "C source file" "056a321d6a357d10" 1 
-"C:\TP_SP4\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
 [OPTIONS_Debug_Renesas M32C Configurator]
 "Single Shot" "056a321d6a357d10" 6 
 [OPTIONS_Debug_Renesas M32C Librarian]
@@ -145,14 +145,14 @@
 "[V|VERSION|1] [S|OUTPUT|OBJECTCODE] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).r30^"] [B|INSPECTOR|1] [S|CPU|M32C80] " 1 
 [EXCLUDED_FILES_Debug]
 [LINKAGE_ORDER_Debug]
-"C:\TP_SP4\sp4b2\SP4b2\Debug\ncrt0.r30" 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\Debug\ncrt0.r30" 
 [GENERAL_DATA_CONFIGURATION_Debug]
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Assembler]
 "Assembly source file" "056a321d6a357d10" 2 
-"C:\TP_SP4\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C C Compiler]
 "C source file" "056a321d6a357d10" 1 
-"C:\TP_SP4\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Configurator]
 "Single Shot" "056a321d6a357d10" 6 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Librarian]
@@ -171,14 +171,14 @@
 "[V|VERSION|1] [S|OUTPUT|OBJECTCODE] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).r30^"] [B|INSPECTOR|1] [S|CPU|M32C80] " 1 
 [EXCLUDED_FILES_Debug_M32C_E8a_SYSTEM]
 [LINKAGE_ORDER_Debug_M32C_E8a_SYSTEM]
-"C:\TP_SP4\sp4b2\SP4b2\Debug_M32C_E8a_SYSTEM\ncrt0.r30" 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\Debug_M32C_E8a_SYSTEM\ncrt0.r30" 
 [GENERAL_DATA_CONFIGURATION_Debug_M32C_E8a_SYSTEM]
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Assembler]
 "Assembly source file" "056a321d6a357d10" 2 
-"C:\TP_SP4\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C C Compiler]
 "C source file" "056a321d6a357d10" 1 
-"C:\TP_SP4\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Configurator]
 "Single Shot" "056a321d6a357d10" 6 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Librarian]
@@ -197,14 +197,14 @@
 "[V|VERSION|1] [S|OUTPUT|OBJECTCODE] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).r30^"] [B|INSPECTOR|1] [S|CPU|M32C80] " 1 
 [EXCLUDED_FILES_Debug_M32C_Simulator]
 [LINKAGE_ORDER_Debug_M32C_Simulator]
-"C:\TP_SP4\sp4b2\SP4b2\Debug_M32C_Simulator\ncrt0.r30" 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\Debug_M32C_Simulator\ncrt0.r30" 
 [GENERAL_DATA_CONFIGURATION_Debug_M32C_Simulator]
 [OPTIONS_Release_Renesas M32C Assembler]
 "Assembly source file" "056a321d6a357d10" 2 
-"C:\TP_SP4\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\ncrt0.a30" "056a321d6a357d10" 2 
 [OPTIONS_Release_Renesas M32C C Compiler]
 "C source file" "056a321d6a357d10" 1 
-"C:\TP_SP4\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.c" "056a321d6a357d10" 1 
 [OPTIONS_Release_Renesas M32C Configurator]
 "Single Shot" "056a321d6a357d10" 6 
 [OPTIONS_Release_Renesas M32C Librarian]
@@ -223,7 +223,7 @@
 "[V|VERSION|1] [S|OUTPUT|OBJECTCODE] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(FILELEAF).r30^"] [B|INSPECTOR|1] [S|CPU|M32C80] " 1 
 [EXCLUDED_FILES_Release]
 [LINKAGE_ORDER_Release]
-"C:\TP_SP4\sp4b2\SP4b2\Release\ncrt0.r30" 
+"D:\TP_SP4_KIS\sp4b2\SP4b2\Release\ncrt0.r30" 
 [GENERAL_DATA_CONFIGURATION_Release]
 [GENERAL_DATA_CONFIGURATION_SESSION_Debug_DefaultSession]
 [SESSION_DATA_CONFIGURATION_SESSION_Debug_DefaultSession]
Index: branch/KIS/sp4b2/SP4b2.hws
===================================================================
--- branch/KIS/sp4b2/SP4b2.hws	(revision 709)
+++ branch/KIS/sp4b2/SP4b2.hws	(revision 710)
@@ -3,12 +3,12 @@
 [DATABASE_VERSION]
 "11.0" 
 [WORKSPACE_DETAILS]
-"SP4b2" "C:\TP_SP4\sp4b2" "C:\TP_SP4\sp4b2\SP4b2.hws" "M16C/80,M32C" "Renesas M32C Standard" 
+"SP4b2" "D:\TP_SP4_KIS\sp4b2" "D:\TP_SP4_KIS\sp4b2\SP4b2.hws" "M16C/80,M32C" "Renesas M32C Standard" 
 [SHARED_WORKSPACE_CONTROL_STATUS]
 "" "" "" 
 "" "" "" 
 [PROJECTS]
-"SP4b2" "C:\TP_SP4\sp4b2\SP4b2" "C:\TP_SP4\sp4b2\SP4b2\SP4b2.hwp" 0 
+"SP4b2" "D:\TP_SP4_KIS\sp4b2\SP4b2" "D:\TP_SP4_KIS\sp4b2\SP4b2\SP4b2.hwp" 0 
 [INFORMATION]
 "No workspace information available" 
 [SCRAP]
