@@ -373,9 +373,11 int send_tm_lfr_tc_exe_corrupted(ccsdsTe | |||
|
373 | 373 | Packet_TM_LFR_TC_EXE_CORRUPTED_t TM; |
|
374 | 374 | unsigned char messageSize; |
|
375 | 375 | unsigned int packetLength; |
|
376 | unsigned int estimatedPacketLength; | |
|
376 | 377 | unsigned char *packetDataField; |
|
377 | 378 | |
|
378 | packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter | |
|
379 | packetLength = (TC->packetLength[0] * 256) + TC->packetLength[1]; // compute the packet length parameter written in the TC | |
|
380 | estimatedPacketLength = (unsigned int) (currentTC_LEN_RCV[0] * 256 + currentTC_LEN_RCV[1]); | |
|
379 | 381 | packetDataField = (unsigned char *) &TC->headerFlag_pusVersion_Ack; // get the beginning of the data field |
|
380 | 382 | |
|
381 | 383 | TM.targetLogicalAddress = CCSDS_DESTINATION_ID; |
@@ -412,8 +414,10 int send_tm_lfr_tc_exe_corrupted(ccsdsTe | |||
|
412 | 414 | TM.pkt_len_rcv_value[1] = TC->packetLength[1]; |
|
413 | 415 | TM.pkt_datafieldsize_cnt[0] = currentTC_LEN_RCV[0]; |
|
414 | 416 | TM.pkt_datafieldsize_cnt[1] = currentTC_LEN_RCV[1]; |
|
415 | TM.rcv_crc[0] = packetDataField[ packetLength - 1 ]; | |
|
416 | TM.rcv_crc[1] = packetDataField[ packetLength ]; | |
|
417 | // TM.rcv_crc[0] = packetDataField[ packetLength - 1 ]; | |
|
418 | // TM.rcv_crc[1] = packetDataField[ packetLength ]; | |
|
419 | TM.rcv_crc[0] = packetDataField[ estimatedPacketLength - 1 ]; | |
|
420 | TM.rcv_crc[1] = packetDataField[ estimatedPacketLength ]; | |
|
417 | 421 | TM.computed_crc[0] = computed_CRC[0]; |
|
418 | 422 | TM.computed_crc[1] = computed_CRC[1]; |
|
419 | 423 |
General Comments 0
You need to be logged in to leave comments.
Login now