![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
2018 revision to classic DataBus AVC code.
Dependencies: LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell
Diff: Updater.h
- Revision:
- 12:3cd91e150d9c
- Parent:
- 11:8ec858b7c6d1
- Child:
- 13:5566df1250f1
--- a/Updater.h Wed Dec 12 17:20:16 2018 +0000 +++ b/Updater.h Wed Dec 12 17:32:24 2018 +0000 @@ -4,24 +4,17 @@ #include "mbed.h" #include "L3G4200D.h" -class Updater { +class Updater: private mbed::NonCopyable<Updater> { public: void start(int interval_ms); - static Updater *instance(); - - int get_gyro() { return g; } + void gyro(int g[3]); private: - typedef struct { - int g[3]; // gyro - float dt; // delta time - } sensor_data_t; - Updater() {} // parameterize Timer *t; void update(); - int g; + int _gyro[3]; int thisTime; int lastTime; };