![](/media/cache/group/nine_tails_kurama_by_zubair43-d4zyf5s.jpg.50x50_q85.jpg)
PWM and ALGO updated.. PWM getting generated
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of TFR_BAE_vr1_1working_finally_PWM_update by
Revision 13:75aa0104f5e6, committed 2016-04-02
- Comitter:
- Bragadeesh153
- Date:
- Sat Apr 02 14:27:09 2016 +0000
- Parent:
- 12:f82fbe93fab3
- Commit message:
- sensor units updated
Changed in this revision
ACS.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ACS.cpp Fri Apr 01 18:58:43 2016 +0000 +++ b/ACS.cpp Sat Apr 02 14:27:09 2016 +0000 @@ -60,7 +60,16 @@ void FCTN_ACS_CNTRLALGO(float b[3],float omega[3]) { - controller (moment, b, omega, b_old, alarmmode, flag_firsttime, controlmode); + float b1[3]; + float omega1[3]; + b1[0] = b[0]/1000000.0; + b1[1] = b[1]/1000000.0; + b1[2] = b[2]/1000000.0; + + omega1[0] = omega[0]*3.14159/180; + omega1[1] = omega[1]*3.14159/180; + omega1[2] = omega[2]*3.14159/180; + controller (moment, b1, omega1, b_old, alarmmode, flag_firsttime, controlmode); } void controller (float moment[3], float b1[3], float omega1[3], float b_old[3], int &alarmmode, int &flag_firsttime, int &controlmode)