Latest FM Code with EEPROM

Dependencies:   FreescaleIAP SimpleDMA eeprom mbed-rtos mbed

Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by Team Fox

Revision:
353:e1803e801e20
Parent:
352:022c513aee03
Child:
354:eb6c863756a8
--- a/COM_MNG_TMTC.h	Mon Feb 06 16:36:46 2017 +0000
+++ b/COM_MNG_TMTC.h	Tue Feb 21 06:30:56 2017 +0000
@@ -362,6 +362,7 @@
             //BAE_TC;
             gPC.printf("Telecommand is for BAE\r\n");
             //gPC.printf("Sending TC to BAE...\r\n"); //interrupt to be sent to the bae
+       //     wait_ms(100);
             y = FCTN_I2C_WRITE((char*)tc_ptr->TC_string,TC_LONG_SIZE);                         // Check for SHORT and LONG TC and then send
                 
             if(y==1)                                                            
@@ -858,16 +859,17 @@
                         {                            
                             //gPC.printf("TC_RST_BAE\r\n"); // call PWR_SWCH_ON function
                             
-                            RST_BAE();
+                            SW_RST_BAE();
                             Base_tm *tm_ptr_short = new Short_tm;
                             ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
                             return tm_ptr_short;                            
                         }
+                        
                         else if(GETpid(tc_ptr)==0x34)
                         {                            
                             //gPC.printf("TC_RST_PL_BEE\r\n"); // call PWR_SWCH_ON function
-                            
-                            RST_PL_BEE();
+                            SW_RST_PL_BEE();
+                           // RST_PL_BEE();
                             Base_tm *tm_ptr_short = new Short_tm;
                             ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
                             return tm_ptr_short;                                                        
@@ -880,6 +882,26 @@
                             Base_tm *tm_ptr_short = new Short_tm;
                             ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
                         }
+                       // added by samp starts here
+                        else if(GETpid(tc_ptr)==0x39)
+                        {                            
+                            //gPC.printf("TC_RST_BAE\r\n"); // call PWR_SWCH_ON function
+                            
+                           RST_BAE();
+                            Base_tm *tm_ptr_short = new Short_tm;
+                            ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
+                            return tm_ptr_short;                            
+                        }
+                         else if(GETpid(tc_ptr)==0x3b)
+                        {                            
+                            //gPC.printf("TC_RST_BAE\r\n"); // call PWR_SWCH_ON function
+                            
+                           RST_PL_BEE();
+                            Base_tm *tm_ptr_short = new Short_tm;
+                            ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
+                            return tm_ptr_short;                            
+                        }
+                        // added by samp ends here
                         else if(GETpid(tc_ptr)==0x40)
                         {                         
                             //gPC.printf("RESET_HK_COUNTER\r\n"); // call PWR_SWCH_ON function
@@ -1123,6 +1145,7 @@
                 int poll=0;
                 while(poll<2000 && PL_I2C_Intr==0)
                 {
+                 // gPC.printf("\n\rPL_I2C_Intr is low");
                     wait_us(10);
                     poll+=1;
                 }