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: SimpleDMA eeprom mbed-rtos mbed FreescaleIAP
Fork of CDMS_CODE by
Revision 122:b99f8be0a51a, committed 2016-02-07
- Comitter:
- krishanprajapat
- Date:
- Sun Feb 07 05:28:56 2016 +0000
- Parent:
- 121:bd7263168ee4
- Child:
- 123:457d6fd9ac37
- Commit message:
- updated
Changed in this revision
--- a/COM_MNG_TMTC.h Sat Feb 06 20:06:25 2016 +0000
+++ b/COM_MNG_TMTC.h Sun Feb 07 05:28:56 2016 +0000
@@ -37,29 +37,9 @@
// typeof tm_ptr: Base_tm
// typeof tc_ptr: Base_tc
// typeof temp_xxxx: uint8_t
-#define fill_l1_ack(tm_ptr) {\
- tm_ptr->next_TM = NULL;\
- tm_ptr->TM_string[0] = TMID_ACK_L1 << 4;\
- /*PENDING: PA TEMPERATURE*/\
- tm_ptr->TM_string[1] = gTOTAL_INCORRECT_SIZE_TC & 0xFF;\
- tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
-}
+
-#define put_crc_l1_ack(tm_ptr) {\
- tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
- /*TC LIST STATUS*/\
- tm_ptr->TM_string[3] |= (gMASTER_STATE << 5) & 0xE0;\
- /*PA HOT*/\
- if( gFLAGS & COM_PA_HOT_FLAG ){\
- tm_ptr->TM_string[3] |= (1 << 4);\
- }\
- else{\
- tm_ptr->TM_string[3] &= ~(1 << 4);\
- }\
- uint16_t crc_checksum = crc16_gen(tm_ptr->TM_string, TM_SHORT_SIZE-2);\
- tm_ptr->TM_string[TM_SHORT_SIZE-2] = (crc_checksum >> 8) & 0xFF;\
- tm_ptr->TM_string[TM_SHORT_SIZE-1] = crc_checksum & 0xFF;\
-}
+
#define detect_ack(tm_ptr, temp_ack, tc_psc) {\
if( tm_ptr != NULL ){\
@@ -113,10 +93,7 @@
}\
}
-#define isPAhot(returnHere){\
- /*PENDING : COMPLETE THIS FUNCTION*/\
- returnHere = 0xFF;\
-}
+
void after_cooling_pa(){
gCOM_MNG_TMTC_THREAD->signal_set(COM_MNG_TMTC_SIGNAL_UART_INT);
--- a/OBSRS.h Sat Feb 06 20:06:25 2016 +0000
+++ b/OBSRS.h Sun Feb 07 05:28:56 2016 +0000
@@ -188,9 +188,10 @@
}\
else if(T_frame_Ack_andcallsign_sent < T_frame_in_Ackandcallsign){\
make_T_frame_Ack_andcallsign;\
+ enable_SCH = true;\
}\
else{\
- /*cout<<"error in send_Ack_andcallsign if T_frames_sent < T_frames_in_segment"<<ENDL;*/\
+ /*cout<<"error in send_Ack_andcallsign if T_frames_sent < T_frames_in_segment"<<ENDL;*/\
}\
}\
if(T_frames_sent == T_frames_in_segment){\
@@ -206,7 +207,7 @@
}\
}\
else{\
- send_EoS_and_stop = true; \
+ send_EoS_and_stop = true; \
} \
}\
}\
@@ -464,8 +465,10 @@
if(create_Ack_andcallsign){
create_Ack_L234;
Base_tm *ack_and_callsign = callsign;
+ get_ack_l1(ack_and_callsign->next_TM);
snd_tm.head_pointer(ack_and_callsign);
T_frame_in_Ackandcallsign = 2*snd_tm.make_shor_tm();
+ enable_SCH = true;
create_Ack_andcallsign = false;
}
send_Ack_andcallsign;
--- a/common_functions.h Sat Feb 06 20:06:25 2016 +0000
+++ b/common_functions.h Sun Feb 07 05:28:56 2016 +0000
@@ -105,6 +105,35 @@
}\
}
+#define put_crc_l1_ack(tm_ptr) {\
+ tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
+ /*TC LIST STATUS*/\
+ tm_ptr->TM_string[3] |= (gMASTER_STATE << 5) & 0xE0;\
+ /*PA HOT*/\
+ if( gFLAGS & COM_PA_HOT_FLAG ){\
+ tm_ptr->TM_string[3] |= (1 << 4);\
+ }\
+ else{\
+ tm_ptr->TM_string[3] &= ~(1 << 4);\
+ }\
+ uint16_t crc_checksum = crc16_gen(tm_ptr->TM_string, TM_SHORT_SIZE-2);\
+ tm_ptr->TM_string[TM_SHORT_SIZE-2] = (crc_checksum >> 8) & 0xFF;\
+ tm_ptr->TM_string[TM_SHORT_SIZE-1] = crc_checksum & 0xFF;\
+}
+
+#define fill_l1_ack(tm_ptr) {\
+ tm_ptr->next_TM = NULL;\
+ tm_ptr->TM_string[0] = TMID_ACK_L1 << 4;\
+ /*PENDING: PA TEMPERATURE*/\
+ tm_ptr->TM_string[1] = gTOTAL_INCORRECT_SIZE_TC & 0xFF;\
+ tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
+}
+
+#define isPAhot(returnHere){\
+ /*PENDING : COMPLETE THIS FUNCTION*/\
+ returnHere = 0xFF;\
+}
+
#define get_call_sign(tm_ptr) {\
Base_tm* call_sign_tm = new Short_tm;\
call_sign_tm->next_TM = NULL;\
