Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of priustroller_2 by
Diff: core.h
- Revision:
- 6:99ee0ce47fb2
- Parent:
- 1:1f58bdcf2956
- Child:
- 7:76d6ceb23e0d
--- a/core.h Tue Mar 03 06:28:10 2015 +0000 +++ b/core.h Wed Mar 04 15:33:32 2015 +0000 @@ -13,17 +13,17 @@ class Motor { public: - Motor(CurrentSensor *sense_a, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t); + Motor(CurrentSensor *sense_c, CurrentSensor *sense_b, PositionSensor *sense_p, TempSensor *sense_t); void Config(int num_poles, float kv); - float UpdateCurrentA(); + float UpdateCurrentC(); float UpdateCurrentB(); float UpdatePosition(); float UpdateTemp(); void UpdateState(); public: - float angle, I_a, I_b, temp; + float angle, I_c, I_b, temp; private: - CurrentSensor *_sense_a,*_sense_b; + CurrentSensor *_sense_c,*_sense_b; PositionSensor *_sense_p; TempSensor *_sense_t; int _num_poles; @@ -43,6 +43,7 @@ public: float dtcA, dtcB, dtcC; float v_bus, temp; + float va, vb; //debug private: PwmOut *_pwm_a, *_pwm_b, *_pwm_c; DigitalOut *_en;