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.
main.cpp@11:2156cb77d0d6, 2019-10-04 (annotated)
- Committer:
- GaspardD
- Date:
- Fri Oct 04 09:58:51 2019 +0000
- Revision:
- 11:2156cb77d0d6
- Parent:
- 9:1b54bac6d9a7
- Child:
- 12:58ad06f9847d
version avec log et tout
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GaspardD | 1:8faddee0e52f | 1 | #include "sm_esc.h" |
GaspardD | 2:e9d928fd327a | 2 | #include "sm_servo.h" |
GaspardD | 4:efa207509f63 | 3 | #include "sm_sections.h" |
GaspardD | 8:f23601373e8b | 4 | #include "sm_mpu.h" |
GaspardD | 6:ab9f3695633f | 5 | |
GaspardD | 6:ab9f3695633f | 6 | |
GaspardD | 0:38b6065539a0 | 7 | |
GaspardD | 3:1b7eb426247e | 8 | int main() |
GaspardD | 3:1b7eb426247e | 9 | { |
GaspardD | 8:f23601373e8b | 10 | //on met le jumper sur le chassis le plus récent. Avec le jumper, b_CHASSIS_Mode = 0. |
GaspardD | 6:ab9f3695633f | 11 | init_chassis_mode(); |
GaspardD | 9:1b54bac6d9a7 | 12 | |
GaspardD | 4:efa207509f63 | 13 | //init timers |
GaspardD | 8:f23601373e8b | 14 | t_utils_timerSinceStart.start(); |
GaspardD | 0:38b6065539a0 | 15 | |
GaspardD | 4:efa207509f63 | 16 | //init_interruptions |
GaspardD | 8:f23601373e8b | 17 | b_UTILS_button.fall(&it_pressed); |
GaspardD | 8:f23601373e8b | 18 | b_ODOM_odom.fall(&it_odom); |
GaspardD | 8:f23601373e8b | 19 | b_UTILS_emergency_signal.rise(&it_emergency_signal_recieved); |
GaspardD | 3:1b7eb426247e | 20 | |
GaspardD | 1:8faddee0e52f | 21 | //init state machines |
GaspardD | 9:1b54bac6d9a7 | 22 | rs_LOG_pc.printf("init state machines\r\n"); |
GaspardD | 3:1b7eb426247e | 23 | |
GaspardD | 8:f23601373e8b | 24 | init_sm_mpu(); |
GaspardD | 8:f23601373e8b | 25 | init_sm_sections(); |
GaspardD | 6:ab9f3695633f | 26 | init_sm_esc(); |
GaspardD | 3:1b7eb426247e | 27 | init_sm_servo(); |
GaspardD | 2:e9d928fd327a | 28 | |
GaspardD | 1:8faddee0e52f | 29 | while(1) { |
GaspardD | 11:2156cb77d0d6 | 30 | //rs_LOG_pc.printf("\r\n\r\nTIME: %d\r\n",t_utils_timerSinceStart.read_ms()); |
GaspardD | 9:1b54bac6d9a7 | 31 | |
GaspardD | 8:f23601373e8b | 32 | update_sm_mpu(); |
GaspardD | 8:f23601373e8b | 33 | update_sm_sections(); |
GaspardD | 1:8faddee0e52f | 34 | update_sm_esc(); |
GaspardD | 4:efa207509f63 | 35 | update_sm_servo(); |
GaspardD | 3:1b7eb426247e | 36 | |
GaspardD | 8:f23601373e8b | 37 | output_sm_mpu(); |
GaspardD | 8:f23601373e8b | 38 | output_sm_sections(); |
GaspardD | 4:efa207509f63 | 39 | output_sm_esc(); |
GaspardD | 3:1b7eb426247e | 40 | output_sm_servo(); |
GaspardD | 8:f23601373e8b | 41 | |
GaspardD | 0:38b6065539a0 | 42 | } |
GaspardD | 0:38b6065539a0 | 43 | } |