![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Updated BAE RTOS
Fork of all_combined_week6 by
Diff: HK.cpp
- Revision:
- 7:b3f876f605d9
- Parent:
- 6:82153349cc9b
diff -r 82153349cc9b -r b3f876f605d9 HK.cpp --- a/HK.cpp Tue Jul 15 10:04:38 2014 +0000 +++ b/HK.cpp Fri Sep 19 05:12:40 2014 +0000 @@ -17,24 +17,24 @@ if(y>=15)y=15; return y; } - +ShortBeacy Shortbeacon; void init_beacon(ShortBeacy x){ - x.Voltage[0]=1; - x.AngularSpeed[0]=2; - x.AngularSpeed[1]=3; - x.SubsystemStatus[0]=145; - x.Temp[0]=1; - x.Temp[1]=2; - x.Temp[2]=3; - x.ErrorFlag[0]=3; + ; } -ShortBeacy Shortbeacon; + void FUNC_HK_MAIN() { printf("\nEntered function HK MAIN\n"); - init_beacon(Shortbeacon); + Shortbeacon.Voltage[0]=1; + Shortbeacon.AngularSpeed[0]=2; + Shortbeacon.AngularSpeed[1]=3; + Shortbeacon.SubsystemStatus[0]=145; + Shortbeacon.Temp[0]=1; + Shortbeacon.Temp[1]=2; + Shortbeacon.Temp[2]=3; + Shortbeacon.ErrorFlag[0]=3; int LoopIterator; @@ -69,12 +69,11 @@ wait_us(10.0); // A delay of 10 microseconds between each sensor output. Can be changed. } - for(int i=0;i<8;i++) - { - printf("\nVoltage %d is %u\n",i,Sensor.Voltage[i]); - printf("\nCurrent %d is %u\n",i,Sensor.Current[i]); - printf("\nTemperature %d is %u\n",i,Sensor.Temperature[i]); - } + + printf("\nVoltage is %u\n",Sensor.Voltage[0]); + printf("\nCurrent is %u\n",Sensor.Current[0]); + printf("\ntemperature is %u\n",Sensor.Temperature[0]); + printf("\nExited function HK MAIN\n"); -} \ No newline at end of file +}