![](/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@31:ed23647fd16e, 2015-08-31 (annotated)
- Committer:
- salco
- Date:
- Mon Aug 31 13:36:39 2015 +0000
- Revision:
- 31:ed23647fd16e
- Parent:
- 30:7305ea319fe6
- Child:
- 32:65eecdf56e2c
reduc the #ifdef in TTaskCritique
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 | 30:7305ea319fe6 | 11 | #include "AnsiGraphicalConsole.h" |
salco | 3:e0d6e081a9d3 | 12 | |
salco | 29:51308764fdd0 | 13 | #include "source/Task/TTaskCritique.h" |
salco | 29:51308764fdd0 | 14 | #include "source/Task/TTaskAlerte.h" |
salco | 29:51308764fdd0 | 15 | #include "source/Task/TTaskGeneral.h" |
salco | 0:e4151abdff23 | 16 | |
salco | 30:7305ea319fe6 | 17 | |
salco | 30:7305ea319fe6 | 18 | //#include <fcntl.h> |
salco | 30:7305ea319fe6 | 19 | //#include <io.h> |
salco | 30:7305ea319fe6 | 20 | //#include <stdio.h> |
salco | 30:7305ea319fe6 | 21 | //#include <iostream> |
salco | 30:7305ea319fe6 | 22 | |
salco | 31:ed23647fd16e | 23 | |
salco | 19:0ac80045ba4c | 24 | DigitalOut myled(LED1, 0); |
salco | 11:496453b45e25 | 25 | DigitalIn mybutton(USER_BUTTON); |
salco | 15:91b3c572d9df | 26 | DigitalOut pinA(PA_13); |
salco | 15:91b3c572d9df | 27 | DigitalOut pinB(PA_14); |
salco | 27:ea60d12dccdf | 28 | |
salco | 0:e4151abdff23 | 29 | int main() |
salco | 0:e4151abdff23 | 30 | { |
salco | 28:ac5c6350ed9a | 31 | wait(3); |
salco | 0:e4151abdff23 | 32 | ////////// |
salco | 0:e4151abdff23 | 33 | // Boot // |
salco | 0:e4151abdff23 | 34 | ////////// |
salco | 3:e0d6e081a9d3 | 35 | |
salco | 29:51308764fdd0 | 36 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 37 | debug("\n\rInit taskCritique ..."); |
salco | 29:51308764fdd0 | 38 | #endif |
salco | 29:51308764fdd0 | 39 | TTaskCritique taskCritique(40); |
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 taskAlerte ..."); |
salco | 29:51308764fdd0 | 46 | //#endif |
salco | 29:51308764fdd0 | 47 | // TTaskCritique taskAlerte(20);// un-use because i dont know what to do with. |
salco | 29:51308764fdd0 | 48 | //#ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 49 | //debug(" end"); |
salco | 29:51308764fdd0 | 50 | //#endif |
salco | 29:51308764fdd0 | 51 | |
salco | 29:51308764fdd0 | 52 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 53 | debug("\n\rInit taskGeneral ..."); |
salco | 29:51308764fdd0 | 54 | #endif |
salco | 29:51308764fdd0 | 55 | TTaskCritique taskGeneral(20); |
salco | 29:51308764fdd0 | 56 | #ifdef DBG_MAIN_INIT |
salco | 29:51308764fdd0 | 57 | debug(" end"); |
salco | 29:51308764fdd0 | 58 | #endif |
salco | 30:7305ea319fe6 | 59 | |
salco | 30:7305ea319fe6 | 60 | |
salco | 29:51308764fdd0 | 61 | |
salco | 0:e4151abdff23 | 62 | while(1) { |
salco | 31:ed23647fd16e | 63 | |
salco | 31:ed23647fd16e | 64 | |
salco | 27:ea60d12dccdf | 65 | |
salco | 29:51308764fdd0 | 66 | #if taskCritique |
salco | 29:51308764fdd0 | 67 | taskCritique.exec(); |
salco | 29:51308764fdd0 | 68 | #endif |
salco | 29:51308764fdd0 | 69 | |
salco | 29:51308764fdd0 | 70 | #if taskAlerte |
salco | 29:51308764fdd0 | 71 | taskAlerte.exec(); |
salco | 29:51308764fdd0 | 72 | #endif |
salco | 29:51308764fdd0 | 73 | |
salco | 29:51308764fdd0 | 74 | #if taskGeneral |
salco | 28:ac5c6350ed9a | 75 | taskGeneral.exec(); |
salco | 31:ed23647fd16e | 76 | |
salco | 29:51308764fdd0 | 77 | #endif |
salco | 29:51308764fdd0 | 78 | |
salco | 29:51308764fdd0 | 79 | /*if (mybutton == 0) { // Button is pressed |
salco | 29:51308764fdd0 | 80 | debug("Hello debug world"); |
salco | 29:51308764fdd0 | 81 | wait(2); |
salco | 27:ea60d12dccdf | 82 | |
salco | 11:496453b45e25 | 83 | myled = !myled; |
salco | 16:5ea4337d785f | 84 | wait(1); |
salco | 29:51308764fdd0 | 85 | }*/ |
salco | 11:496453b45e25 | 86 | |
salco | 29:51308764fdd0 | 87 | } |
salco | 29:51308764fdd0 | 88 | |
salco | 29:51308764fdd0 | 89 | } |