![](/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
Updater.h@12:3cd91e150d9c, 2018-12-12 (annotated)
- Committer:
- shimniok
- Date:
- Wed Dec 12 17:32:24 2018 +0000
- Revision:
- 12:3cd91e150d9c
- Parent:
- 11:8ec858b7c6d1
- Child:
- 13:5566df1250f1
pass back 3 gyro axis data; implement reset shell cmd
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimniok | 11:8ec858b7c6d1 | 1 | #ifndef __UPDATER_H |
shimniok | 11:8ec858b7c6d1 | 2 | #define __UPDATER_H |
shimniok | 11:8ec858b7c6d1 | 3 | |
shimniok | 11:8ec858b7c6d1 | 4 | #include "mbed.h" |
shimniok | 11:8ec858b7c6d1 | 5 | #include "L3G4200D.h" |
shimniok | 11:8ec858b7c6d1 | 6 | |
shimniok | 12:3cd91e150d9c | 7 | class Updater: private mbed::NonCopyable<Updater> { |
shimniok | 11:8ec858b7c6d1 | 8 | public: |
shimniok | 11:8ec858b7c6d1 | 9 | void start(int interval_ms); |
shimniok | 11:8ec858b7c6d1 | 10 | static Updater *instance(); |
shimniok | 12:3cd91e150d9c | 11 | void gyro(int g[3]); |
shimniok | 11:8ec858b7c6d1 | 12 | |
shimniok | 11:8ec858b7c6d1 | 13 | private: |
shimniok | 11:8ec858b7c6d1 | 14 | Updater() {} // parameterize |
shimniok | 11:8ec858b7c6d1 | 15 | Timer *t; |
shimniok | 11:8ec858b7c6d1 | 16 | void update(); |
shimniok | 12:3cd91e150d9c | 17 | int _gyro[3]; |
shimniok | 11:8ec858b7c6d1 | 18 | int thisTime; |
shimniok | 11:8ec858b7c6d1 | 19 | int lastTime; |
shimniok | 11:8ec858b7c6d1 | 20 | }; |
shimniok | 11:8ec858b7c6d1 | 21 | |
shimniok | 11:8ec858b7c6d1 | 22 | #endif |