![](/media/cache/profiles/4b0986230d9d7aded7f0c24033d221d4.jpg.50x50_q85.jpg)
Programme de contrôle de l'octopode 4DOF, Theraphosa-Salconi.
CtrlBridge
- fonction quelquonque pour communiquer avec les module
- fonction quelquonque pour faire des recherche dans les module dispo
- autre fonction pour jouer avec MemRegistre
Version 1.2.0
- Ajout d'un mode de simulation pour tester le code avec seulement un contrôleur stm32
main.cpp@29:51308764fdd0, 2015-07-28 (annotated)
- Committer:
- salco
- Date:
- Tue Jul 28 04:30:12 2015 +0000
- Revision:
- 29:51308764fdd0
- Parent:
- 28:ac5c6350ed9a
- Child:
- 30:7305ea319fe6
Simplification du code et debut du mode debug
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
salco | 0:e4151abdff23 | 1 | //------------------------------------ |
salco | 0:e4151abdff23 | 2 | // Hyperterminal configuration |
salco | 0:e4151abdff23 | 3 | // 9600 bauds, 8-bit data, no parity |
salco | 0:e4151abdff23 | 4 | //------------------------------------ |
salco | 0:e4151abdff23 | 5 | |
salco | 29:51308764fdd0 | 6 | #include "mbed.h" |
salco | 29:51308764fdd0 | 7 | //#include "OSNAPprotocoleDefine.h" |
salco | 29:51308764fdd0 | 8 | //#include "mouvement.h" |
salco | 29:51308764fdd0 | 9 | #include "debug.h" |
salco | 29:51308764fdd0 | 10 | #include "settingDebug.h" |
salco | 3:e0d6e081a9d3 | 11 | |
salco | 29:51308764fdd0 | 12 | #include "source/Task/TTaskCritique.h" |
salco | 29:51308764fdd0 | 13 | #include "source/Task/TTaskAlerte.h" |
salco | 29:51308764fdd0 | 14 | #include "source/Task/TTaskGeneral.h" |
salco | 0:e4151abdff23 | 15 | |
salco | 19:0ac80045ba4c | 16 | DigitalOut myled(LED1, 0); |
salco | 11:496453b45e25 | 17 | DigitalIn mybutton(USER_BUTTON); |
salco | 15:91b3c572d9df | 18 | DigitalOut pinA(PA_13); |
salco | 15:91b3c572d9df | 19 | DigitalOut pinB(PA_14); |
salco | 27:ea60d12dccdf | 20 | |
salco | 0:e4151abdff23 | 21 | int main() |
salco | 0:e4151abdff23 | 22 | { |
salco | 28:ac5c6350ed9a | 23 | wait(3); |
salco | 0:e4151abdff23 | 24 | ////////// |
salco | 0:e4151abdff23 | 25 | // Boot // |
salco | 0:e4151abdff23 | 26 | ////////// |
salco | 3:e0d6e081a9d3 | 27 | |
salco | 29:51308764fdd0 | 28 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 29 | debug("\n\rInit taskCritique ..."); |
salco | 29:51308764fdd0 | 30 | #endif |
salco | 29:51308764fdd0 | 31 | TTaskCritique taskCritique(40); |
salco | 29:51308764fdd0 | 32 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 33 | debug(" end"); |
salco | 29:51308764fdd0 | 34 | #endif |
salco | 29:51308764fdd0 | 35 | |
salco | 29:51308764fdd0 | 36 | //#ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 37 | //debug("\n\rInit taskAlerte ..."); |
salco | 29:51308764fdd0 | 38 | //#endif |
salco | 29:51308764fdd0 | 39 | // TTaskCritique taskAlerte(20);// un-use because i dont know what to do with. |
salco | 29:51308764fdd0 | 40 | //#ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 41 | //debug(" end"); |
salco | 29:51308764fdd0 | 42 | //#endif |
salco | 29:51308764fdd0 | 43 | |
salco | 29:51308764fdd0 | 44 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 45 | debug("\n\rInit taskGeneral ..."); |
salco | 29:51308764fdd0 | 46 | #endif |
salco | 29:51308764fdd0 | 47 | TTaskCritique taskGeneral(20); |
salco | 29:51308764fdd0 | 48 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 49 | debug(" end"); |
salco | 29:51308764fdd0 | 50 | #endif |
salco | 29:51308764fdd0 | 51 | |
salco | 0:e4151abdff23 | 52 | while(1) { |
salco | 27:ea60d12dccdf | 53 | |
salco | 29:51308764fdd0 | 54 | #if taskCritique |
salco | 29:51308764fdd0 | 55 | taskCritique.exec(); |
salco | 29:51308764fdd0 | 56 | #endif |
salco | 29:51308764fdd0 | 57 | |
salco | 29:51308764fdd0 | 58 | #if taskAlerte |
salco | 29:51308764fdd0 | 59 | taskAlerte.exec(); |
salco | 29:51308764fdd0 | 60 | #endif |
salco | 29:51308764fdd0 | 61 | |
salco | 29:51308764fdd0 | 62 | #if taskGeneral |
salco | 28:ac5c6350ed9a | 63 | taskGeneral.exec(); |
salco | 29:51308764fdd0 | 64 | #endif |
salco | 29:51308764fdd0 | 65 | |
salco | 29:51308764fdd0 | 66 | /*if (mybutton == 0) { // Button is pressed |
salco | 29:51308764fdd0 | 67 | debug("Hello debug world"); |
salco | 29:51308764fdd0 | 68 | wait(2); |
salco | 27:ea60d12dccdf | 69 | |
salco | 11:496453b45e25 | 70 | myled = !myled; |
salco | 16:5ea4337d785f | 71 | wait(1); |
salco | 29:51308764fdd0 | 72 | }*/ |
salco | 11:496453b45e25 | 73 | |
salco | 29:51308764fdd0 | 74 | } |
salco | 29:51308764fdd0 | 75 | |
salco | 29:51308764fdd0 | 76 | } |