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 workinQM_5thJan_azad by
Diff: ACS.cpp
- Revision:
- 19:79e69017c855
- Parent:
- 18:3662058a7c10
- Child:
- 20:949d13045431
diff -r 3662058a7c10 -r 79e69017c855 ACS.cpp --- a/ACS.cpp Sat May 14 11:19:13 2016 +0000 +++ b/ACS.cpp Sat Jun 04 11:29:13 2016 +0000 @@ -8,6 +8,9 @@ #include "ACS.h" #include "EPS.h" +/*timer for determining the execution time*/ +//Timer time; + //********************************flags******************************************// extern uint32_t BAE_STATUS; extern uint32_t BAE_ENABLE; @@ -448,6 +451,8 @@ void FCTN_ATS_DATA_ACQ() { + //time.start(); + ACS_DATA_ACQ_STATUS = 1; //set ACS_DATA_ACQ_STATUS flag for att sens 2 if( ACS_ATS_ENABLE == 1) { @@ -463,15 +468,15 @@ pc_acs.printf("Event Status is %x\n \r",(int)status); //if the 6th and 4th bit are 1 then it implies that gyro and magnetometer values are ready to take if(((int)status&40)==40){ //when both work -/// if((int)status==8){ //for just mag -/// if((int)status == 36){ //for just gyro as status 24(in binary) = 36 in decimal -/// if((int)status==___yet to be decided___){ //for pass through state see how it tworks +///// if((int)status==8){ //for just mag +///// if((int)status == 36){ //for just gyro as status 24(in binary) = 36 in decimal +///// if((int)status==___yet to be decided___){ //for pass through state see how it tworks /*don't ask for info if the gyro cupped as interrupt makes it go haywire that is enables the pins for gyro*/ cmd[0]=GYRO_XOUT_H; //0x22 gyro LSB of x i2c.write(SLAVE_ADDR,cmd,1); i2c.read(SLAVE_ADDR_READ,raw_gyro,6); -printf("\n\n\n\r here reached"); + /*editing the data*/ cmd[0]=MAG_XOUT_H; //LSB of x