CDMS code for testing sbc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
261:1e54415b34d3
Parent:
203:424308159a56
Child:
266:ae588e75cfa4
--- a/Compression.h	Tue Jul 12 17:54:30 2016 +0000
+++ b/Compression.h	Thu Jul 14 13:07:30 2016 +0000
@@ -49,9 +49,9 @@
 uint8_t srp_mode , at , pzf , ezf ,sfp[65] ,scp[55];; //tells which mode is calibrated or plot 0 for calibrated and 1 for scatterered, below threshold , proton zero flux, electron zero flux.
 unsigned int sfp_bin[52] , scp_bin[52];         //storing the bin values.
 unsigned int sfp_threshold_m0[52] = {8128,8128,8128,8128,8128,8128,8128,8128,960,960,960,960,960,960,960,960,960,960,960,960,4032,4032,4032,4032,8128,8128,8128,8128,4032,4032,124,124,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,252,252,252,252,252}; 
-const unsigned int scp_threshold_m0[52] = {245760,245760,245760,245760,245760,245760,245760,245760,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,114688,114688,114688,114688,245760,245760,245760,245760,114688,114688,4032,4032,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,8128,4032,4032,4032,4032};
+unsigned int scp_threshold_m0[52] = {245760,245760,245760,245760,245760,245760,245760,245760,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,49152,114688,114688,114688,114688,245760,245760,245760,245760,114688,114688,4032,4032,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,1984,8128,4032,4032,4032,4032};
 unsigned int scp_threshold_m0_1[9]={114688,245760,245760,245760,245760,114688,114688,65472,65472} ; //for mode 0..ie callibrated mode
-const unsigned int sfp_threshold_m1[2] ={252,8128},scp_threshold_m1[2]={7680,245760};
+unsigned int sfp_threshold_m1[2] ={252,8128},scp_threshold_m1[2]={7680,245760};
 uint8_t frames[3][134] = {0};
 uint8_t position_tm_frame[3] = {8,11,5} , position_tm_starting[3] = {8,11,5}; //{sc,sf-bt,sf-at}
 uint8_t id;   //sf = 0,sc-at = 1,sc-bt = 2;
@@ -292,7 +292,7 @@
                     space = adjust(1,0,pointer,8);
                     space = adjust(4,3,pointer,space);
                     FSC_science = FSC_CURRENT[3]+1;
-                    gPC.printf("SID = 3, FSC = %02X\r\n", FSC_CURRENT[3]+1);
+                    //gPC.printf("SID = 3, FSC = %02X\r\n", FSC_CURRENT[3]+1);
                     frames[id][1] = (FSC_science>>24)&0xff;
                     frames[id][2] = (FSC_science>>16)&0xff;
                     frames[id][3] = (FSC_science>>8)&0xff;
@@ -306,7 +306,7 @@
                     space = adjust(1,0,pointer,8);
                     space = adjust(4,2,pointer,space);
                     FSC_science = FSC_CURRENT[2]+1;
-                    gPC.printf("SID = 2, FSC = %02X\r\n", FSC_science);
+                    //gPC.printf("SID = 2, FSC = %02X\r\n", FSC_science);
                     frames[id][1] = (FSC_science>>16)&0xff;
                     frames[id][2] = (FSC_science>>8)&0xff;
                     frames[id][3] = FSC_science&0xff;
@@ -336,7 +336,7 @@
                   }
                 if(sd_stat)
                 {
-                    gPC.puts("sd write failure");
+                    //gPC.puts("sd write failure");
                     break;
                     }
                 position_tm_frame[id] = position_tm_starting[id];
@@ -594,7 +594,7 @@
                 space = adjust(1,0,pointer,8);
                 space = adjust(4,1,pointer,space);
                 FSC_science = FSC_CURRENT[1]+1;
-                gPC.printf("SID = 1, FSC = %02X\r\n", FSC_science);
+                //gPC.printf("SID = 1, FSC = %02X\r\n", FSC_science);
                 frames[id][1] = (FSC_science>>16)&0xff;
                 frames[id][2] = (FSC_science>>8)&0xff;
                 frames[id][3] = (FSC_science)&0xff;
@@ -616,7 +616,7 @@
                 sd_stat = SD_WRITE(TM_interleave_data,FSC_CURRENT[1]+1,1);
                 if(sd_stat)
                 {
-                    gPC.puts("sd write failure");
+                    //gPC.puts("sd write failure");
                     break;
                 }
                 position_tm_frame[id] = position_tm_starting[id];