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 SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: OBSRS.h
- Revision:
- 203:424308159a56
- Parent:
- 202:8700a3e6324c
- Child:
- 204:72f52e74e0e4
--- a/OBSRS.h Fri Jul 01 08:56:27 2016 +0000
+++ b/OBSRS.h Fri Jul 01 17:41:48 2016 +0000
@@ -175,7 +175,6 @@
buffer_112[counter_buffer_112] = SCH40[counter_SCH40++];\
if (counter_SCH40 == 5)\
{ \
- /*gPC.printf("Asch40 sent\r\n");*/\
counter_SCH40 = 0;\
enable_SCH = false;\
enable_DS = true;\
@@ -215,7 +214,6 @@
T_frames_sent = T_frames_sent +2;\
if(repeat_last_2T_frames){\
enable_SCH = true;\
- /*gPC.printf("repeated last 2 tframes\r\n");*/\
/*cout<<"T_frames_sent = "<<T_frames_sent<<ENDL;*/\
}\
else{\
@@ -224,10 +222,8 @@
T_frame_Ack_andcallsign_sent = T_frame_Ack_andcallsign_sent + 2;\
if(T_frame_Ack_andcallsign_sent == T_frame_in_Ackandcallsign ){\
repeat_last_2T_frames = true;\
- }\
- else if(T_frame_Ack_andcallsign_sent < T_frame_in_Ackandcallsign){\
- T_frame_in_Ackandcallsign = 2*snd_tm.make_shor_tm();\
- enable_SCH = true;\
+ for(int i =0; i<144;i++)\
+ {interleave_data[0][i] = 0;interleave_data[1][i] = 0; }\
}\
else{\
gPC.printf("error in send ack\r\n");\
@@ -235,15 +231,7 @@
}\
if(T_frames_sent == T_frames_in_segment){\
if(T_frame_Ack_andcallsign_sent < T_frame_in_Ackandcallsign){\
- if(segments_sent + 1>= max_segments){\
- adf_limit = true;\
- segments_sent = 0;\
- gPC.printf("adf limit reached");\
- }\
- else{\
- enable_new_segment = true;\
- gPC.printf("new segment");\
- }\
+ gPC.printf("error in tframes sent = in seg");\
}\
else{\
send_EoS_and_stop = true; \
@@ -525,7 +513,7 @@
}
get_call_sign(ack_and_callsign->next_TM);
snd_tm.head_pointer_sdcard(ack_head);
- T_frame_in_Ackandcallsign = 2*snd_tm.make_shor_tm();
+ T_frame_in_Ackandcallsign = (2*snd_tm.make_shor_tm());
/* gPC.printf(" T_frame_in_Ackandcallsign = %d\r\n",T_frame_in_Ackandcallsign);*/
Base_tm *ack_l234 = ack_and_callsign->next_TM;
@@ -594,9 +582,8 @@
// }
//int write_success = SD_WRITE(write_buffer,FSC + block_counter,SID);
// wait_ms(8);
- //ack_code = SD_READ(buffer_512, FSC + block_counter,SID);
-/* gPC.printf("read block %d \n\r",read_success);*/
- ack_code = 0x02;
+ ack_code = SD_READ(buffer_512, FSC + block_counter,SID);
+ //ack_code = 0x02;
}
else{
ack_code = SD_READ(buffer_512, list_of_FSC[block_counter],SID);
@@ -621,7 +608,7 @@
enable_T_frame = false;
}
else if(ack_code == 0x86){
- gPC.printf("FSC outof bounds");
+ /*gPC.printf("FSC outof bounds");*/
enable_T_frame = false;
}
else{
