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 eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: Compression.h
- Revision:
- 98:fd99ddc0e0a1
- Parent:
- 96:4ca92f9775e0
- Child:
- 99:efde3df6cd94
--- a/Compression.h Mon Jan 25 14:20:44 2016 +0000
+++ b/Compression.h Tue Jan 26 10:05:19 2016 +0000
@@ -67,7 +67,10 @@
//give the pointer of 6 second data to this function
void srp(unsigned char * head){
- sci_time = FCTN_CDMS_RD_RTC();
+ //sci_time = FCTN_CDMS_RD_RTC();
+ sci_time = 0;
+ gPC.puts("enter srp");
+
for (int i = 0; i < 52 ; i++){
scp_bin[i] = 0;
}
@@ -155,6 +158,8 @@
}
}//below thershold ends here.
+ //gPC.puts("below_thresh\r\n");
+
if(at == 1){
pointer = sfp + 6; debug_cntr = 6;space = 8;
sfp[0] = (sci_time>>27)&0xff; sfp[1] = (sci_time>>19)&0xff; sfp[2] = (sci_time>>11)&0xff; sfp[3] = (sci_time>>3)&0xff;
@@ -238,6 +243,8 @@
}
}
}
+
+ //gPC.puts("sci fine pack\r\n");
//science fine packet is complete here.
//lets try to make frame now******************************************************************************************************************************
if(srp_mode == 0){
@@ -272,7 +279,7 @@
if(id == 1){ //below thereshold
space = adjust(1,0,pointer,8);
space = adjust(4,3,pointer,space);
- FSC_science = FCTN_SD_MNGR(3);
+ //FSC_science = FCTN_SD_MNGR(3);
//gPC.printf("SID = 3, FSC = %02X\r\n", FSC_science);
frames[id][1] = (FSC_science>>24)&0xff;
frames[id][2] = (FSC_science>>16)&0xff;
@@ -286,7 +293,7 @@
}else if(id == 2){
space = adjust(1,0,pointer,8);
space = adjust(4,2,pointer,space);
- FSC_science = FCTN_SD_MNGR(2);
+ //FSC_science = FCTN_SD_MNGR(2);
//gPC.printf("SID = 2, FSC = %02X\r\n", FSC_science);
frames[id][1] = (FSC_science>>16)&0xff;
frames[id][2] = (FSC_science>>8)&0xff;
@@ -299,9 +306,9 @@
interleave(TM_convoluted_data,TM_interleave_data);
interleave(TM_convoluted_data+ 135,TM_interleave_data + 144);
if(id == 1)
- SD_WRITE(TM_interleave_data,FSC_science,3);
+ /*SD_WRITE(TM_interleave_data,FSC_science,3)*/;
else if (id == 2)
- SD_WRITE(TM_interleave_data,FSC_science,2);
+ /*SD_WRITE(TM_interleave_data,FSC_science,2)*/;
position_tm_frame[id] = position_tm_starting[id];
frames[id][6-id] = (length-1) - j; // first head pointer.
}
@@ -367,6 +374,8 @@
ezf = 0;
}
+ gPC.puts("scp\r\n");
+
pointer = scp; debug_cntr = 0; space = 8;
unsigned char packet_pp = 1; //where to get this packet present bit----------------------------------------------------------------------------------
int sfp_at_counter; //----------------------------------------------------------------------------------------------------------------------------------
@@ -505,6 +514,9 @@
}
}
}//-----------------------------------------------------------------------------------------------------------------------------------------------------
+
+ gPC.puts("sci frame starts\r\n");
+
//time to make scp frame
id = 0;
if(srp_mode == 0 && compression_option == 0){
@@ -550,7 +562,7 @@
pointer = frames[id];
space = adjust(1,0,pointer,8);
space = adjust(4,1,pointer,space);
- FSC_science = FCTN_SD_MNGR(1);
+ //FSC_science = FCTN_SD_MNGR(1);
//gPC.printf("SID = 1, FSC = %02X\r\n", FSC_science);
frames[id][1] = (FSC_science>>16)&0xff;
frames[id][2] = (FSC_science>>8)&0xff;
@@ -564,7 +576,7 @@
convolution(frames[id]);
interleave(TM_convoluted_data,TM_interleave_data);
interleave(TM_convoluted_data+ 135,TM_interleave_data + 144);
- SD_WRITE(TM_interleave_data,FSC_science,1);
+ /*SD_WRITE(TM_interleave_data,FSC_science,1);*/
position_tm_frame[id] = position_tm_starting[id];
frames[id][4] = (length-1) - j;
}
