sakthi priya amirtharaj
/
BAE_vr2_gingerbread2
mag n gyro included
Fork of BAE_vr2_gingerbread2 by
Revision 4:12fe853d8bcf, committed 2014-12-17
- Comitter:
- sakthipriya
- Date:
- Wed Dec 17 10:15:38 2014 +0000
- Parent:
- 3:3d9e5f48b0c1
- Commit message:
- mag n gyr data included
Changed in this revision
diff -r 3d9e5f48b0c1 -r 12fe853d8bcf ACS.h --- a/ACS.h Wed Dec 17 09:52:27 2014 +0000 +++ b/ACS.h Wed Dec 17 10:15:38 2014 +0000 @@ -1,6 +1,6 @@ #include "mbed.h" #include "math.h" - +#include "pin_config.h" void FUNC_ACS_GENPWM(float *); float * FUNC_ACS_MAG_EXEC(void); void FUNC_ACS_MAG_INIT();
diff -r 3d9e5f48b0c1 -r 12fe853d8bcf HK.cpp --- a/HK.cpp Wed Dec 17 09:52:27 2014 +0000 +++ b/HK.cpp Wed Dec 17 10:15:38 2014 +0000 @@ -1,5 +1,5 @@ #include "HK.h" - +#include "pin_config.h" //GPIO pins used=> D2-D12, A0-A1
diff -r 3d9e5f48b0c1 -r 12fe853d8bcf HK.h --- a/HK.h Wed Dec 17 09:52:27 2014 +0000 +++ b/HK.h Wed Dec 17 10:15:38 2014 +0000 @@ -22,9 +22,9 @@ float Temperature[1]; float PanelTemperature[4]; float BatteryTemperature; //to be populated - char faultpoll; //polled faults - char faultir; //interrupted faults - char power_mode; //power modes + char faultpoll; //polled faults //not necessary as it is already in the Sensor Data Quantised + char faultir; //interrupted faults //same + char power_mode; //power modes //same float AngularSpeed[3]; //in order x,y,z float Bnewvalue[3]; //in order Bx,By,Bz
diff -r 3d9e5f48b0c1 -r 12fe853d8bcf beacon.h --- a/beacon.h Wed Dec 17 09:52:27 2014 +0000 +++ b/beacon.h Wed Dec 17 10:15:38 2014 +0000 @@ -1,5 +1,5 @@ #include "mbed.h" - +#include "pin_config.h" void writereg(uint8_t reg,uint8_t val); uint8_t readreg(uint8_t reg); void FUNC_BEA();
diff -r 3d9e5f48b0c1 -r 12fe853d8bcf main.cpp --- a/main.cpp Wed Dec 17 09:52:27 2014 +0000 +++ b/main.cpp Wed Dec 17 10:15:38 2014 +0000 @@ -6,6 +6,7 @@ #include "ACS.h" #include "fault.h" #include "slave.h" +#include "pin_config.h" Serial pc(USBTX, USBRX); @@ -57,6 +58,7 @@ //-------------------------------------------------------------------------------------------------------------------------------------------------- char hk_data[25]; +extern SensorData Sensor; extern SensorDataQuantised SensorQuantised; void t_hk_acq(void const *args) { @@ -96,8 +98,13 @@ t.start(); mag_field= FUNC_ACS_MAG_EXEC(); //actual execution omega = FUNC_ACS_EXEC_GYR(); + Sensor.AngularSpeed[0]= omega[0]; + Sensor.AngularSpeed[1]= omega[1]; + Sensor.AngularSpeed[2]= omega[2]; - + Sensor.Bnewvalue[0] = mag_field[0]; + Sensor.Bnewvalue[1] = mag_field[1]; + Sensor.Bnewvalue[2] = mag_field[2]; if(acs_pflag == 1) {