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.
Dependencies: BufferedSerial FatFileSystemCpp mbed
FIZ_readers/FIZReader.h@66:066b16c6c34f, 2021-11-16 (annotated)
- Committer:
- JamieB
- Date:
- Tue Nov 16 19:01:34 2021 +0000
- Revision:
- 66:066b16c6c34f
- Parent:
- 17:5ce3fe98e76d
- Child:
- 80:0b7f1b85b626
Changed Buffered Serial to Read Raw Serial in RX Interrupt
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AndyA | 3:14d241e29be3 | 1 | #ifndef __FIZReader_H__ |
AndyA | 3:14d241e29be3 | 2 | #define __FIZReader_H__ |
AndyA | 3:14d241e29be3 | 3 | #include "BufferedSerial.h" |
AndyA | 3:14d241e29be3 | 4 | |
AndyA | 3:14d241e29be3 | 5 | class FIZReader { |
AndyA | 3:14d241e29be3 | 6 | |
AndyA | 3:14d241e29be3 | 7 | public: |
AndyA | 3:14d241e29be3 | 8 | FIZReader(const PinName Tx, const PinName Rx); |
AndyA | 16:a8d3a0dbe4bf | 9 | virtual void requestCurrent() = 0; |
AndyA | 3:14d241e29be3 | 10 | |
AndyA | 3:14d241e29be3 | 11 | /// true if the values have been updated since the last update. |
AndyA | 17:5ce3fe98e76d | 12 | // focus and zoom are in mm, iris is in 100ths of a stop |
AndyA | 16:a8d3a0dbe4bf | 13 | bool getMostRecent(uint32_t *focus, uint16_t *iris, uint16_t *zoom); |
AndyA | 3:14d241e29be3 | 14 | |
AndyA | 16:a8d3a0dbe4bf | 15 | protected: |
AndyA | 16:a8d3a0dbe4bf | 16 | int hexValue(char ascii); |
AndyA | 3:14d241e29be3 | 17 | |
AndyA | 6:61274e214f46 | 18 | RawSerial _port; |
AndyA | 16:a8d3a0dbe4bf | 19 | |
AndyA | 16:a8d3a0dbe4bf | 20 | uint32_t _focus; // in mm |
AndyA | 16:a8d3a0dbe4bf | 21 | uint16_t _iris; // in 100ths of F stop |
AndyA | 16:a8d3a0dbe4bf | 22 | uint16_t _zoom; // in mm |
AndyA | 3:14d241e29be3 | 23 | bool newData; |
AndyA | 16:a8d3a0dbe4bf | 24 | |
AndyA | 3:14d241e29be3 | 25 | }; |
AndyA | 3:14d241e29be3 | 26 | |
AndyA | 3:14d241e29be3 | 27 | #endif |