Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Diff: CDMS_HK.h
- Revision:
- 268:ded5306a1fd1
- Parent:
- 264:f7d8f9f361e3
- Child:
- 269:24c50959b0a4
- Child:
- 271:72529b247333
- Child:
- 275:605dd29161ad
diff -r 783c248a6207 -r ded5306a1fd1 CDMS_HK.h --- a/CDMS_HK.h Sat Jul 16 16:04:14 2016 +0000 +++ b/CDMS_HK.h Wed Jul 20 09:58:59 2016 +0000 @@ -37,6 +37,7 @@ void FCTN_CDMS_HK_MAIN(void const *args) { + uint8_t sd_stat = 0; while(1) { gHK_THREAD->signal_wait(HK_SIGNAL); @@ -97,7 +98,12 @@ for(int i=0; i<288; i++) CDMS_HEALTH_FINAL[i] = interleave_CDMS_HK[i]; - //SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); + sd_stat = SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); + if(sd_stat) + { + gPC.puts("sd write failure"); + break; + } gPC.printf("Completed CDMS HK\t"); /*---------------------------------- BAE HK --------------------------------------------*/ @@ -128,7 +134,12 @@ interleave(convoluted_BAE_HK +135, interleave_BAE_HK + 144); for(int i=0; i<288; i++) BAE_HEALTH_FINAL[i] = interleave_BAE_HK[i]; - //SD_WRITE(BAE_HEALTH_FINAL,FSC_CURRENT[5]+1,5); + sd_stat = SD_WRITE(BAE_HEALTH_FINAL,FSC_CURRENT[5]+1,5); + if(sd_stat) + { + gPC.puts("sd write failure"); + break; + } } } else {