![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
gotta check ctrl algo - it gives negative value
Fork of BAE_hw_test1_3 by
Diff: main.cpp
- Revision:
- 11:6b00f3b1be17
- Parent:
- 9:8b74ed33be76
diff -r 8bfa80bf4263 -r 6b00f3b1be17 main.cpp --- a/main.cpp Sun Mar 01 08:26:04 2015 +0000 +++ b/main.cpp Wed Mar 04 17:15:15 2015 +0000 @@ -98,6 +98,7 @@ float *omega; float mag_field1[3]; float omega1[1]; + float tauc1[3]; float moment[3]; float *mnm_data; while(1) @@ -128,12 +129,19 @@ } if(acs_pflag == 1) { - FUNC_ACS_CNTRLALGO(mag_field1,omega1,moment); + FUNC_ACS_CNTRLALGO(mag_field1,omega1,tauc1); printf("\n\r control algo values "); for(int i=0; i<3; i++) { + printf("%f\t",tauc1[i]); + } + moment_calc (tauc1, mag_field1,moment); + printf("\n\r moment values "); + for(int i=0; i<3; i++) + { printf("%f\t",moment[i]); } + FUNC_ACS_GENPWM(moment); }