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 BAE_b4hw_test by
Revision 6:1cdbda747f99, committed 2015-02-06
- Comitter:
- sakthipriya
- Date:
- Fri Feb 06 18:26:46 2015 +0000
- Parent:
- 5:4199c0dfed33
- Commit message:
- BAE without beacon
Changed in this revision
ACS.cpp | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ACS.cpp Thu Feb 05 22:05:29 2015 +0000 +++ b/ACS.cpp Fri Feb 06 18:26:46 2015 +0000 @@ -73,7 +73,7 @@ // printf("!!!!!!!!!!Error!!!!!!!!!"); } //DCx = 25; - printf("\n\r icx :%f\n\r",DCx); + printf("\n\r icx :%f\n\r",ix); float DCy = 0; //Duty cycle of Moment in x, y, z directions float iy = 0; //Current sent in x, y, z TR's
--- a/main.cpp Thu Feb 05 22:05:29 2015 +0000 +++ b/main.cpp Fri Feb 06 18:26:46 2015 +0000 @@ -116,7 +116,14 @@ for(int i=3; i<6; i++) { printf("%f\t",mnm_data[i]); } - + for(int i = 0 ; i<3;i++) + { + omega[i] = mnm_data[i]; + } + for( int i = 3;i<6;i++) + { + mag_field[i-3] = mnm_data[i]; + } if(acs_pflag == 1) { moment = FUNC_ACS_CNTRLALGO(mag_field,omega); @@ -242,9 +249,9 @@ if( slave.receive()==1) { t2.stop(); - //t3.start(); + slave_status=slave.write(data,length); - //t3.stop(); + t3.stop(); } else if( slave.receive()==3 || slave.receive()==2) @@ -252,7 +259,7 @@ t2.stop(); //t3.start(); slave_status=slave.read(data,length); - //t3.stop(); + t3.stop(); } @@ -260,8 +267,8 @@ printf("\n\r%d\r",t2.read_us()); t2.reset(); - //printf("\n\r%d\r",t3.read_us()); - //t3.reset(); + printf("\n\r%d\r",t3.read_us()); + t3.reset(); } @@ -312,6 +319,7 @@ { t2.start(); + // t3.start(); ptr_t_i2c->signal_set(0x4);