![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
hk data sent using string
Fork of BAE_FRDMTESIN2 by
Diff: main.cpp
- Revision:
- 5:255b43e8e21a
- Parent:
- 4:8f6c24eca109
- Child:
- 6:e65b1ab79f36
diff -r 8f6c24eca109 -r 255b43e8e21a main.cpp --- a/main.cpp Wed Dec 03 11:23:37 2014 +0000 +++ b/main.cpp Thu Dec 04 07:17:44 2014 +0000 @@ -10,9 +10,9 @@ -Timer t; //To know the time of entering each thread +Timer t; //To know the time of execution each thread Timer t1; - //To know the time of execution of each thread + //To know the time of entering of each thread Thread *ptr_t_hk_acq; Thread *ptr_t_acs; @@ -78,6 +78,7 @@ printf("The angular velocity is %.2f rad/s\n\r",ptr2->omega); } +int acs_pflag = 1; void t_acs(void const *args) { while(1) @@ -89,9 +90,11 @@ func_acs_readdata(ptr); q_acs.put(ptr); + if(acs_pflag == 1) + { func_acs_ctrlalgo(); FUNC_ACS_GENPWM(); //Generating PWM signal. - + } t.reset(); } @@ -190,15 +193,17 @@ } } }*/ + +extern SensorData Sensor; void T_FAULT(void const *args) { - char flag2='1'; + Sensor.power_mode='0'; while(1) { Thread :: signal_wait(0x2); FAULTS(); - POWER(flag2); - flag2++; //testing ... should be removed + POWER(Sensor.power_mode); + //Sensor.power_mode++; //testing ... should be removed } }