Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Diff: CDMS_HK.h
- Revision:
- 261:1e54415b34d3
- Parent:
- 260:65e1ace927fd
- Child:
- 264:f7d8f9f361e3
diff -r 65e1ace927fd -r 1e54415b34d3 CDMS_HK.h --- a/CDMS_HK.h Tue Jul 12 17:54:30 2016 +0000 +++ b/CDMS_HK.h Thu Jul 14 13:07:30 2016 +0000 @@ -40,7 +40,7 @@ while(1) { gHK_THREAD->signal_wait(HK_SIGNAL); - gPC.printf("Entering HK thread"); + gPC.printf("\n\nEntering HK thread\n"); gMutex.lock(); @@ -75,7 +75,7 @@ uint64_t time = FCTN_CDMS_RD_RTC() >> 7; //Reading Time from RTC for(int i = 124; i<128; i++) CDMS_HEALTH_DATA[i] = time >> i*8; - + gPC.printf("0x%x\n",time); FCTN_SD_MNGR(); //Adding FSC & TMID to TM frame CDMS_HK_FRAME[0] = 0x20; CDMS_HK_FRAME[1] = FSC_CURRENT[4]+1; @@ -97,20 +97,19 @@ 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); - gPC.printf("\rCompleted CDMS HK\n"); + //SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); + gPC.printf("Completed CDMS HK\t"); /*---------------------------------- BAE HK --------------------------------------------*/ - BAE_HK_I2C = FCTN_I2C_READ(BAE_HK,134); - gPC.printf("\rEntering BAE HK\n"); + gPC.printf("Entering BAE HK\t"); if(BAE_HK_I2C == 0) { crc = crc16_gen((unsigned char *)BAE_HK,132); if(crc == ((uint16_t)BAE_HK[132] << 8) | (uint16_t)BAE_HK[133]){ TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7; - for(int i = 0; i<15; i++) - gPC.printf("\r 0x%02X\n",BAE_HK[i]); + /*for(int i = 0; i<15; i++) + gPC.printf("\r 0x%02X\n",BAE_HK[i]);*/ for(int i = 0; i<4; i++) BAE_HK[i] = time >> i; BAE_HK_FRAME[0] = 0x28; @@ -133,11 +132,11 @@ } } else { - gPC.printf("\rBAE HK data not recieved through I2C\n"); + gPC.printf("BAE HK data not recieved through I2C\t"); for(int i = 0; i<134; i++) BAE_HK[i] = 0; } - gPC.printf("\rCompleted BAE HK\n"); + gPC.printf("Completed BAE HK\n"); /*----------------------------------Beacon message--------------------------------------*/ unsigned char SC_HK_LBM_0[135];