Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Diff: Robots/Strategie_small.cpp
- Revision:
- 4:88431b537477
- Parent:
- 3:19f2285a4757
- Child:
- 5:dcd817534b57
diff -r 19f2285a4757 -r 88431b537477 Robots/Strategie_small.cpp --- 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