vr1.1

Dependencies:   FreescaleIAP mbed-rtos mbed

Fork of CDMS_RTOS_v1_1 by Team Fox

Revision:
5:c77b49508927
Parent:
4:cc85cfaa2086
Child:
7:c270a9e37290
--- a/TC.cpp	Tue Jun 16 13:06:19 2015 +0000
+++ b/TC.cpp	Tue Jun 16 16:09:47 2015 +0000
@@ -396,7 +396,7 @@
                                         else if((appdata[0]&0xF0)==0xE0){
                                         sc.printf("RD_RTC\r\n"); //tm is func_mngmt_service_tm
                                         uint8_t* data;
-                                        data = FUNC_CDMS_RD_RTC();
+                                        FUNC_CDMS_RD_RTC(data);
                                         telemetry_type2[0]=tmid4_spr_tm;
                                         telemetry_type2[1]=tc_pac_seq_cnt_tm;
                                         telemetry_type2[2]=tm_pac_seq_cnt_tm;
@@ -408,15 +408,16 @@
                                         {
                                            sc.printf("%d\r\r\n",telemetry_type2[i]);
                                         }
-                                        for(int i=11;i<13;i++){
+                                        for(int i=11;i<13;i++)
+                                        {
                                               telemetry_type2[i]=crc_tm[i-11];
                                         }
                                          for(int i=0;i<13;i++)
                                             sd_data[i]=telemetry_type2[i];
                                          for(int i=13;i<512;i++)
-                                            sd_data[i]='f';
-                                         FUNC_WR_SD(sd_data, 1);
-                                         FUNC_RD_SD(sd_read_data,1);
+                                            sd_data[i]='\0';
+                                         FUNC_WR_SD(sd_data, 512);
+                                         FUNC_RD_SD(sd_read_data,512);
                                          sc.printf("data read from sd card\r\r\n");
                                          for(int i=0;i<512;i++)
                                             sc.printf("%d ",sd_read_data[i]);