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/FIZDigiPowerActive.h
- Revision:
- 19:08e6a2283d58
- Child:
- 71:7305a35cee58
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FIZ_readers/FIZDigiPowerActive.h Tue Jun 29 08:40:25 2021 +0000 @@ -0,0 +1,27 @@ +#ifndef __FIZDigiActive_H__ +#define __FIZDigiActive_H__ +#include "FIZReader.h" + +//FIZ protocol used for digipower box. +// this is listen only. + +class FIZDigiPowerActive : public FIZReader +{ + +public: + FIZDigiPowerActive(const PinName Tx, const PinName Rx); + virtual void requestCurrent(); + +private: + static const int InBufferSize = 32; + + void OnRx(void); + void parsePacket(); + + int missedPackets; + uint8_t inputBuffer[InBufferSize]; + int inputPtr; +}; + + +#endif \ No newline at end of file