![](/media/cache/group/Racelogic_Blue_Logo.jpg.50x50_q85.jpg)
I messed up the merge, so pushing it over to another repo so I don't lose it. Will tidy up and remove later
Dependencies: BufferedSerial FatFileSystemCpp mbed
Diff: FIZ_readers/FIZReader.h
- Revision:
- 16:a8d3a0dbe4bf
- Parent:
- 6:61274e214f46
- Child:
- 17:5ce3fe98e76d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FIZ_readers/FIZReader.h Fri Apr 30 11:26:34 2021 +0000 @@ -0,0 +1,26 @@ +#ifndef __FIZReader_H__ +#define __FIZReader_H__ +#include "BufferedSerial.h" + +class FIZReader { + +public: + FIZReader(const PinName Tx, const PinName Rx); + virtual void requestCurrent() = 0; + + /// true if the values have been updated since the last update. + bool getMostRecent(uint32_t *focus, uint16_t *iris, uint16_t *zoom); + +protected: + int hexValue(char ascii); + + RawSerial _port; + + uint32_t _focus; // in mm + uint16_t _iris; // in 100ths of F stop + uint16_t _zoom; // in mm + bool newData; + +}; + +#endif