Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of workinQM_5thJan_azad by
Diff: TCTM.cpp
- Revision:
- 38:95f0cc565ee3
- Parent:
- 36:cc77770d787f
--- a/TCTM.cpp Fri Jun 24 08:08:52 2016 +0000 +++ b/TCTM.cpp Mon Jul 04 17:46:48 2016 +0000 @@ -78,16 +78,19 @@ //uint8_t tm1[134]; -void FCTN_BAE_TM_TC (uint8_t* tc) +//uint8_t telemetry[134]; +void FCTN_BAE_TM_TC (uint8_t* tc) { + for(int i=0;i<134;i++) + telemetry[i]=tc[i]; // tm1[0] = 1; uint8_t service_type=(tc[2]&0xF0); /*chaged*/ uint8_t* tm; // without it some identifier error - uint16_t crc16; - - + uint16_t crc16=CRC::crc16_gen(telemetry,9); + //printf("\n\r the crc is %x",crc16); + switch(service_type) { case 0x60: @@ -135,9 +138,7 @@ tm[6+i] =(uint8_t ) (((FLASH_TEMP)>>8)&0xFF); tm[7+i] =(uint8_t ) ((FLASH_TEMP) & 0xFF); - } - - + } for (int i=4+8*4; i<132;i++) { tm[i] = 0x00; @@ -499,7 +500,7 @@ { case 0x01: { - printf("FMS Activated\r\n"); + //printf("FMS Activated\r\n"); uint8_t pid=tc[3]; switch(pid) { @@ -1100,7 +1101,7 @@ } case 0x34: { - printf("CDMS_SW_RESET\r\n"); + //printf("CDMS_SW_RESET\r\n"); //ACK_L234_TM telemetry[0]=0xB0; telemetry[1]=tc[0];