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@2:e9d928fd327a, 2019-09-28 (annotated)
- Committer:
- GaspardD
- Date:
- Sat Sep 28 22:58:02 2019 +0000
- Revision:
- 2:e9d928fd327a
- Parent:
- 1:8faddee0e52f
- Child:
- 3:1b7eb426247e
servo state machine
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 | 0:38b6065539a0 | 3 | |
GaspardD | 1:8faddee0e52f | 4 | int main() { |
GaspardD | 0:38b6065539a0 | 5 | |
GaspardD | 1:8faddee0e52f | 6 | initGPIOs(); |
GaspardD | 1:8faddee0e52f | 7 | init_interruptions(); |
GaspardD | 1:8faddee0e52f | 8 | |
GaspardD | 1:8faddee0e52f | 9 | //init state machines |
GaspardD | 1:8faddee0e52f | 10 | pc.printf("init state machines"); |
GaspardD | 1:8faddee0e52f | 11 | |
GaspardD | 1:8faddee0e52f | 12 | init_sm_esc(); |
GaspardD | 2:e9d928fd327a | 13 | init_sm_servo(); |
GaspardD | 2:e9d928fd327a | 14 | |
GaspardD | 1:8faddee0e52f | 15 | while(1) { |
GaspardD | 0:38b6065539a0 | 16 | |
GaspardD | 1:8faddee0e52f | 17 | update_sm_esc(); |
GaspardD | 2:e9d928fd327a | 18 | update_sm_servo(); |
GaspardD | 1:8faddee0e52f | 19 | |
GaspardD | 1:8faddee0e52f | 20 | output_sm_esc(); |
GaspardD | 2:e9d928fd327a | 21 | output_sm_servo(); |
GaspardD | 0:38b6065539a0 | 22 | } |
GaspardD | 0:38b6065539a0 | 23 | } |