working-est copy with class-based code. still open loop

Dependencies:   mbed

Fork of analoghalls6 by N K

Revision:
10:b4abecccec7a
Parent:
9:d3b70c15baa9
--- a/referencesynthesizers.cpp	Fri Mar 06 19:12:53 2015 +0000
+++ b/referencesynthesizers.cpp	Sun Mar 08 00:45:28 2015 +0000
@@ -1,10 +1,12 @@
 #include "includes.h"
 #include "meta.h"
+#include "sensors.h"
 #include "lut.h"
+#include "core.h"
 
-void SynchronousReferenceSynthesizer::GetReference(float angle, float *ref_d, float *ref_q) {
+void SynchronousReferenceSynthesizer::GetReference(float angle, float throttle, float *ref_d, float *ref_q) {
     *ref_d = 0.0f;
-    *ref_q = _max_phase_current;
+    *ref_q = _max_phase_current*throttle;
 }
 
 float ReferenceSynthesizer::LutSin(float theta) {