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.
Diff: main.cpp
- Revision:
- 3:1b7eb426247e
- Parent:
- 2:e9d928fd327a
- Child:
- 4:efa207509f63
--- a/main.cpp Sat Sep 28 22:58:02 2019 +0000 +++ b/main.cpp Sun Sep 29 00:43:58 2019 +0000 @@ -1,23 +1,25 @@ #include "sm_esc.h" #include "sm_servo.h" -int main() { +int main() +{ initGPIOs(); init_interruptions(); - + //init state machines - pc.printf("init state machines"); - + pc.printf("init state machines\n"); + + init_sm_servo(); init_sm_esc(); - init_sm_servo(); + while(1) { + update_sm_servo(); update_sm_esc(); - update_sm_servo(); - + + output_sm_servo(); output_sm_esc(); - output_sm_servo(); } }