2018 revision to classic DataBus AVC code.
Dependencies: LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell
Diff: main.cpp
- Revision:
- 15:35c40765f7c3
- Parent:
- 14:1dd83e626153
- Child:
- 16:eb28d0f64a9b
diff -r 1dd83e626153 -r 35c40765f7c3 main.cpp --- a/main.cpp Wed Dec 12 18:21:57 2018 +0000 +++ b/main.cpp Thu Dec 13 00:30:59 2018 +0000 @@ -21,7 +21,6 @@ SimpleShell sh; DigitalOut led1(LED1); -Thread thread; /******** SHELL COMMANDS ********/ @@ -93,11 +92,15 @@ sh.attach(read_gyro, "gyro"); sh.attach(read_enc, "enc"); sh.attach(reset, "reset"); - thread.start(callback(&sh, &SimpleShell::run)); + Thread shellThread; + shellThread.start(callback(&sh, &SimpleShell::run)); printf("Starting updater...\n"); Updater *u = Updater::instance(); - u->start(50); + u->setInterval(50); + Thread updaterThread; + updaterThread.set_priority(osPriorityRealtime); + updaterThread.start(callback(u, &Updater::start)); /* FILE *fp;