for frequency correction testing
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Revision 314:9f1b654a0b54, committed 2016-12-07
- Comitter:
- chaithanyarss
- Date:
- Wed Dec 07 06:38:22 2016 +0000
- Parent:
- 313:5d06a08baf0e
- Child:
- 315:f9a30c8cbe96
- Commit message:
- Added cdms_max_min
Changed in this revision
COM_MNG_TMTC.h | Show annotated file Show diff for this revision Revisions of this file |
FMS_all.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/COM_MNG_TMTC.h Tue Dec 06 09:35:26 2016 +0000 +++ b/COM_MNG_TMTC.h Wed Dec 07 06:38:22 2016 +0000 @@ -433,7 +433,12 @@ tm_ptr->TM_string[1] = GETpacket_seq_count(tc_ptr); tm_ptr->TM_string[2] = 0xA0; tm_ptr->TM_string[3] = 0x00; //spare bits + + if(mid == 0x0000) FCTN_CDMS_RD_L_RAM(tm_ptr); + if(mid == 0x0001) + FCTN_CDMS_MAX_MIN(tm_ptr); + crc16 = crc16_gen(tm_ptr->TM_string,132); tm_ptr->TM_string[132] = (uint8_t)((crc16&0xFF00)>>8); tm_ptr->TM_string[133] = (uint8_t)(crc16&0x00FF);
--- a/FMS_all.h Tue Dec 06 09:35:26 2016 +0000 +++ b/FMS_all.h Wed Dec 07 06:38:22 2016 +0000 @@ -343,4 +343,26 @@ //tm_pointer->TM_string[i] = 0; tm_pointer->TM_string[i+4] = CDMS_HEALTH_DATA[i]; } +} + +void FCTN_CDMS_MAX_MIN(Base_tm *tm_pointer) +{ + for(int i=0;i<16;i++) + { + //tm_pointer->TM_string[i] = 0; + tm_pointer->TM_string[i+7] = min_max_data.temp_max[i]; + } + + for(int i=0;i<16;i++) + { + //tm_pointer->TM_string[i] = 0; + tm_pointer->TM_string[i+26] = min_max_data.temp_min[i]; + } + + tm_pointer->TM_string[47] = GPIO_STATUS &0xFF00; + tm_pointer->TM_string[48] |= (GPIO_STATUS<<11) & 0xF000; + + TIME_LATEST_RTC= FCTN_CDMS_RD_RTC() >> 7; + for(int i = 0; i<4; i++) + tm_pointer->TM_string[48+i] = TIME_LATEST_RTC >> (3-i)*8; } \ No newline at end of file