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.
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 |
diff -r f82fbe93fab3 -r 75aa0104f5e6 ACS.cpp --- 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)