Telescope Control Library

Dependents:   PushToGo-F429

PEC.h

Committer:
caoyu@caoyuan9642-desktop.MIT.EDU
Date:
2018-09-09
Revision:
8:21a33760bf10
Parent:
7:9daa589c92c8
Child:
9:d0413a9b1386

File content as of revision 8:21a33760bf10:

/*
 * PEC.h
 *
 *  Created on: Sep 9, 2018
 *      Author: caoyu
 */

#ifndef PUSHTOGO_PEC_H_
#define PUSHTOGO_PEC_H_

#include "mbed.h"
#include "Axis.h"

class PEC {
public:
	PEC(Axis a);
	virtual ~PEC() {
		thread->terminate();
		delete thread;
		delete []pecData;
	}

	bool isEnabled() const {
		return enabled;
	}

	void setEnabled(bool enabled) {
		this->enabled = enabled;
	}

protected:
	Axis axis;
	volatile bool enabled;
	Thread *thread;

	float indexOffset;

	float *pecData;
	int granularity;

	void task();
};



#endif /* PUSHTOGO_PEC_H_ */