Projet Drone de surveillance du labo TRSE (INGESUP)

Dependencies:   mbed PID ADXL345 Camera_LS_Y201 ITG3200 RangeFinder mbos xbee_lib Motor Servo

Committer:
Gaetan
Date:
Sat Apr 27 11:00:25 2013 +0000
Revision:
32:74608bce78f6
Child:
34:4466839f5bb7
Mise ? jour de l'OS de test, nouveau fonctionnement des ?v?nements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Gaetan 32:74608bce78f6 1 /* Copyright (c) 2012 - 2013 Gaëtan PLEYBER
Gaetan 32:74608bce78f6 2 *
Gaetan 32:74608bce78f6 3 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
Gaetan 32:74608bce78f6 4 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
Gaetan 32:74608bce78f6 5 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
Gaetan 32:74608bce78f6 6 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
Gaetan 32:74608bce78f6 7 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
Gaetan 32:74608bce78f6 8 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Gaetan 32:74608bce78f6 9 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
Gaetan 32:74608bce78f6 10 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Gaetan 32:74608bce78f6 11 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Gaetan 32:74608bce78f6 12 */
Gaetan 32:74608bce78f6 13
Gaetan 32:74608bce78f6 14 /*
Gaetan 32:74608bce78f6 15 * Description
Gaetan 32:74608bce78f6 16 * Input
Gaetan 32:74608bce78f6 17 * Output
Gaetan 32:74608bce78f6 18 */
Gaetan 32:74608bce78f6 19
Gaetan 32:74608bce78f6 20
Gaetan 32:74608bce78f6 21 #define TASK_COM 1 // Id for task 1 (idle task is 0)
Gaetan 32:74608bce78f6 22 #define TASK_COM_PRIO 50 // priority for task 1
Gaetan 32:74608bce78f6 23 #define TASK_COM_STACK_SZ 32 // stack size for task 1 in words
Gaetan 32:74608bce78f6 24 #define TIMER_COM_ID 0 // Id for timer 0
Gaetan 32:74608bce78f6 25 #define TIMER_COM_PERIOD 1000 // Time period in milliseconds
Gaetan 32:74608bce78f6 26
Gaetan 32:74608bce78f6 27 #define TASK_DETEC 2
Gaetan 32:74608bce78f6 28 #define TASK_DETEC_PRIO 30
Gaetan 32:74608bce78f6 29 #define TASK_DETEC_STACK_SZ 32
Gaetan 32:74608bce78f6 30 #define TIMER_DETEC_ID 1
Gaetan 32:74608bce78f6 31 #define TIMER_DETEC_PERIOD 1500
Gaetan 32:74608bce78f6 32
Gaetan 32:74608bce78f6 33
Gaetan 32:74608bce78f6 34 #define TASK_VIDEO 3
Gaetan 32:74608bce78f6 35 #define TASK_VIDEO_PRIO 50
Gaetan 32:74608bce78f6 36 #define TASK_VIDEO_STACK_SZ 32
Gaetan 32:74608bce78f6 37 #define TIMER_VIDEO_ID 2
Gaetan 32:74608bce78f6 38 #define TIMER_VIDEO_PERIOD 1000
Gaetan 32:74608bce78f6 39
Gaetan 32:74608bce78f6 40
Gaetan 32:74608bce78f6 41 #define TASK_BATT 4
Gaetan 32:74608bce78f6 42 #define TASK_BATT_PRIO 50
Gaetan 32:74608bce78f6 43 #define TASK_BATT_STACK_SZ 32
Gaetan 32:74608bce78f6 44 #define TIMER_BATT_ID 3
Gaetan 32:74608bce78f6 45 #define TIMER_BATT_PERIOD 1000
Gaetan 32:74608bce78f6 46
Gaetan 32:74608bce78f6 47
Gaetan 32:74608bce78f6 48 #define TASK_MOUV 5
Gaetan 32:74608bce78f6 49 #define TASK_MOUV_PRIO 50
Gaetan 32:74608bce78f6 50 #define TASK_MOUV_STACK_SZ 32
Gaetan 32:74608bce78f6 51 #define TIMER_MOUV_ID 4
Gaetan 32:74608bce78f6 52 #define TIMER_MOUV_PERIOD 1000
Gaetan 32:74608bce78f6 53
Gaetan 32:74608bce78f6 54
Gaetan 32:74608bce78f6 55 #define TASK_TRAJ 6
Gaetan 32:74608bce78f6 56 #define TASK_TRAJ_PRIO 50
Gaetan 32:74608bce78f6 57 #define TASK_TRAJ_STACK_SZ 32
Gaetan 32:74608bce78f6 58 #define TIMER_TRAJ_ID 5
Gaetan 32:74608bce78f6 59 #define TIMER_TRAJ_PERIOD 1000
Gaetan 32:74608bce78f6 60
Gaetan 32:74608bce78f6 61
Gaetan 32:74608bce78f6 62 #define TASK_ARRET_URGENT 7
Gaetan 32:74608bce78f6 63 #define TASK_ARRET_URGENT_PRIO 50
Gaetan 32:74608bce78f6 64 #define TASK_ARRET_URGENT_STACK_SZ 32
Gaetan 32:74608bce78f6 65 #define TIMER_ARRET_URGENT_ID 6
Gaetan 32:74608bce78f6 66 #define TIMER_ARRET_URGENT_PERIOD 1000
Gaetan 32:74608bce78f6 67
Gaetan 32:74608bce78f6 68
Gaetan 32:74608bce78f6 69 #define TIMER_EVENT 1 // Event flag = 0000 0001
Gaetan 32:74608bce78f6 70 #define COMMUNICATION_EVENT 2 // Event flag = 0000 0010
Gaetan 32:74608bce78f6 71 #define COMMANDE_EVENT 4 // Event flag = 0000 0100
Gaetan 32:74608bce78f6 72 #define DETECTION_EVENT 8 // Event flag = 0000 1000