Telescope Control Library

Dependents:   PushToGo-F429

Revision:
10:e356188d208e
Parent:
8:21a33760bf10
Child:
12:35f5cb75743e
--- a/PEC.cpp	Mon Sep 10 02:41:05 2018 -0400
+++ b/PEC.cpp	Fri Sep 14 01:30:55 2018 -0400
@@ -5,9 +5,11 @@
  *      Author: caoyu
  */
 
-#include <PEC.h>
+#include "PEC.h"
+#include "Axis.h"
+#include "TelescopeConfiguration.h"
 
-PEC::PEC(Axis a) :
+PEC::PEC(Axis &a) :
 		axis(a), enabled(false), indexOffset(0) {
 	thread = new Thread(osPriorityAboveNormal,
 	OS_STACK_SIZE, NULL, "PEC Thread");
@@ -16,7 +18,7 @@
 	granularity = TelescopeConfiguration::getInt("pec_granularity");
 	pecData = new float[granularity];
 	for (int i = 0; i < granularity; i++) {
-		pecData = 0.0f;
+		pecData[i] = 0.0f;
 	}
 }