a fork of priustroller

Dependencies:   mbed

Fork of priustroller_current by N K

Revision:
36:11766b5da6ed
Parent:
33:e7b132029bae
Child:
42:e4f35ff78d91
--- a/context.h	Mon Mar 16 15:40:07 2015 +0000
+++ b/context.h	Thu Apr 16 04:08:47 2015 +0000
@@ -18,7 +18,7 @@
     void ConfigureCurrentSensors(PinName ib_pin, PinName ic_pin, float scale, float filter_strength);
     void ConfigureIdPidController(float ki, float kp, float kd, float pidmin, float pidmax);
     void ConfigureIqPidController(float ki, float kp, float kd, float pidmin, float pidmax);
-    void ConfigureThrottle(PinName throttle_pin, float min, float max);
+    void ConfigureThrottle(PinName throttle_pin, float min, float max, float th_filter_strength);
     void ConfigurePositionSensor(PinName pos_a_pin, PinName pos_b_pin, float cal1_a, float cal2_a, float cal1_b, float cal2_b, float offset);
     void ConfigureReference(float max_current);
     void ConfigureDebugger(int debugger_channels, int debugger_size);
@@ -37,7 +37,7 @@
     Modulator *modulator;
     Serial *serial;
     ReferenceSynthesizer *reference;
-    LtiFilter *filter_d, *filter_q;
+    LtiFilter *filter_d, *filter_q, *filter_th;
     BufferedDebugger *debugger;
 private:
     void InitData();
@@ -46,7 +46,7 @@
 private:
     PinName _oa, _ob, _oc, _ib_pin, _ic_pin, _throttle_pin, _pos_a_pin, _pos_b_pin, _en;
     float _dki, _dkp, _dkd, _qki, _qkp, _qkd, _min, _max, _cal1_a, _cal2_a, 
-          _cal1_b, _cal2_b, _scale, _offset, _max_current, _filter_strength;
+          _cal1_b, _cal2_b, _scale, _offset, _max_current, _filter_strength, _th_filter_strength;
     int _debugger_channels, _debugger_size;
     float _dpidmax, _dpidmin, _qpidmax, _qpidmin;
     void (*_callbacks[16])(Context *);