2018 revision to classic DataBus AVC code.
Dependencies: LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell
Logger.h@30:ed791f1f7f7d, 2018-12-26 (annotated)
- Committer:
- shimniok
- Date:
- Wed Dec 26 19:34:17 2018 +0000
- Revision:
- 30:ed791f1f7f7d
- Parent:
- 29:cb2f55fbfe9c
- Child:
- 31:20a95043adb0
Implemented pushbutton, pushbutton toggles logging
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimniok | 24:a7f92dfc5310 | 1 | #ifndef __Logger_H |
shimniok | 24:a7f92dfc5310 | 2 | #define __Logger_H |
shimniok | 24:a7f92dfc5310 | 3 | |
shimniok | 24:a7f92dfc5310 | 4 | #include "mbed.h" |
shimniok | 24:a7f92dfc5310 | 5 | #include "SystemState.h" |
shimniok | 24:a7f92dfc5310 | 6 | |
shimniok | 24:a7f92dfc5310 | 7 | class Logger { |
shimniok | 24:a7f92dfc5310 | 8 | public: |
shimniok | 24:a7f92dfc5310 | 9 | Logger(const char *file); |
shimniok | 29:cb2f55fbfe9c | 10 | void start(); |
shimniok | 29:cb2f55fbfe9c | 11 | void stop(); |
shimniok | 29:cb2f55fbfe9c | 12 | bool enabled(); |
shimniok | 24:a7f92dfc5310 | 13 | void log_gps(GpsData gd); |
shimniok | 30:ed791f1f7f7d | 14 | void log_sensors(SensorData sd); |
shimniok | 24:a7f92dfc5310 | 15 | void log_estimation(); |
shimniok | 24:a7f92dfc5310 | 16 | |
shimniok | 24:a7f92dfc5310 | 17 | private: |
shimniok | 24:a7f92dfc5310 | 18 | const char *_file; |
shimniok | 24:a7f92dfc5310 | 19 | FILE *_fp; |
shimniok | 24:a7f92dfc5310 | 20 | }; |
shimniok | 24:a7f92dfc5310 | 21 | |
shimniok | 24:a7f92dfc5310 | 22 | #endif |