green rosh
/
all_combined_week6
Updated BAE RTOS
Fork of all_combined_week6 by
Diff: main.cpp
- Revision:
- 4:79b97f9cab00
- Parent:
- 2:94ca2059f8b2
- Child:
- 5:c7cd684d25a8
--- a/main.cpp Fri Jul 11 08:54:12 2014 +0000 +++ b/main.cpp Sat Jul 12 07:26:06 2014 +0000 @@ -1,6 +1,6 @@ #include "mbed.h" #include "rtos.h" -#include "hkfinal.h" +#include "HK.h" #include "slave.h" #include "ShortBeacon.h" @@ -56,7 +56,7 @@ printf("The state of acs_write2flash thread is %d\n",ptr_t_acs_write2flash->get_state()); printf("The state of beacon thread is %d\n",ptr_t_bea->get_state()); - FUNC_I2C_SLAVE_MAIN(); + FUNC_I2C_SLAVE_MAIN(24); printf("The time to execute send2cdms is %f\n",t.read()); t.reset(); } @@ -254,21 +254,21 @@ void t_sc(void const *args) { - //printf("The value of i in scheduler is %d\n",i); + printf("The value of i in scheduler is %d\n",schedcount); if(schedcount == 65532) //to reset the counter { schedcount = 0; } - if(schedcount%1==0) + if(schedcount%10==0) { ptr_t_acs -> signal_set(0x1); } - if(schedcount%2==0) + if(schedcount%20==0) { ptr_t_hk_acq -> signal_set(0x2); } - if(schedcount%3==0) + if(schedcount%30==0) { ptr_t_bea -> signal_set(0x3); } @@ -312,11 +312,12 @@ pc.printf("\n T_ACS_WRITE2FLASH priority is %d",ptr_t_acs_write2flash->get_priority()); pc.printf("\n T_BEA priority is %d",ptr_t_bea->get_priority()); RtosTimer t_sc_timer(t_sc,osTimerPeriodic); - t_sc_timer.start(10000); + t_sc_timer.start(1000); printf("\n%f\n",t1.read()); while(1) { + //Thread::wait(1000); ; }