Telescope Control Library
Diff: PEC.h
- Revision:
- 8:21a33760bf10
- Parent:
- 7:9daa589c92c8
- Child:
- 9:d0413a9b1386
diff -r 9daa589c92c8 -r 21a33760bf10 PEC.h --- a/PEC.h Sun Sep 09 16:28:03 2018 -0400 +++ b/PEC.h Sun Sep 09 17:31:20 2018 -0400 @@ -8,10 +8,17 @@ #ifndef PUSHTOGO_PEC_H_ #define PUSHTOGO_PEC_H_ +#include "mbed.h" +#include "Axis.h" + class PEC { public: - PEC(); - virtual ~PEC(); + PEC(Axis a); + virtual ~PEC() { + thread->terminate(); + delete thread; + delete []pecData; + } bool isEnabled() const { return enabled; @@ -22,7 +29,18 @@ } protected: - bool enabled; + Axis axis; + volatile bool enabled; + Thread *thread; + + float indexOffset; + + float *pecData; + int granularity; + + void task(); }; + + #endif /* PUSHTOGO_PEC_H_ */