Programme carte strategie (disco)

Dependencies:   mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Revision:
4:88431b537477
Parent:
3:19f2285a4757
Child:
5:dcd817534b57
--- a/Robots/Strategie_small.cpp	Sun Apr 17 08:31:59 2016 +0000
+++ b/Robots/Strategie_small.cpp	Sun Apr 17 14:03:03 2016 +0000
@@ -73,4 +73,25 @@
     AX12_register(2);
 }
 
+/****************************************************************************************/
+/* FUNCTION NAME: SelectStrategy                                                        */
+/* DESCRIPTION  : Charger le fichier de stratégie correspondante à un id                */
+/* RETURN       : 0=> Erreur, 1=> OK si le fichier existe                               */
+/****************************************************************************************/
+int SelectStrategy(unsigned char id)
+{
+    switch(id)
+    {
+        case 1:
+            strcpy(cheminFileStart,"/local/strat1.txt");
+            return FileExists(cheminFileStart);
+        case 2:
+            strcpy(cheminFileStart,"/local/strat2.txt");
+            return FileExists(cheminFileStart);
+        default:
+            strcpy(cheminFileStart,"/local/strat.txt");
+            return 0;
+    }
+}
+
 #endif