Repository for final Beacon code of IITMSAT

Dependencies:   mbed

Revision:
19:6863457ea3d1
Parent:
18:3d8e70286f67
Child:
20:89b6bb0859a1
diff -r 3d8e70286f67 -r 6863457ea3d1 BCN.cpp
--- a/BCN.cpp	Fri Oct 30 06:26:48 2015 +0000
+++ b/BCN.cpp	Fri Oct 30 06:32:46 2015 +0000
@@ -6,7 +6,7 @@
 SPI spi(D11, D12, D13);              // mosi, miso, sclk 
 DigitalOut cs(D10);                //slave select or chip select
 Timer t_i;
-Timeout flipper;
+Timeout rf_sl_timeout;
 Ticker loop;
 
 //GLOBAL VARIABLES
@@ -14,7 +14,7 @@
 uint8_t BCN_TX_MAIN_STATUS = 0;
 uint8_t BCN_TX_STATUS = 0;
 uint8_t BCN_TX_EN = 1;              //hardcoding for now    //check where is this variable toggled??
-uint8_t BCN_FEN = 0;                //hardcoding for now
+uint8_t BCN_FEN = 0;                //hardcoding for now    //write this value to flash
 uint8_t BCN_STANDBY = 0;            //hardcoding for now    //check where is this variable toggled??
 uint8_t BCN_TS_BUFFER = 0;              // For Temperature 
 
@@ -23,7 +23,7 @@
     pc.printf("FCTN_BCN_INIT\n");
     BCN_INIT_STATUS = 1;
     if(BCN_FEN == 0)
-        flipper.attach(&FCTN_BCN_FEN, 30);
+        rf_sl_timeout.attach(&FCTN_BCN_FEN, 30);
     Init_BEACON_HW();
     BCN_INIT_STATUS = 0;
 }
@@ -86,7 +86,7 @@
     }
     t_i.stop();
     int end = t_i.read_us();
-    pc.printf("The time required for FCTN_BCN_TX_MAIN is %d seconds\r\n", end-begin);
+    pc.printf("The time required for FCTN_BCN_TX_MAIN is %d useconds\r\n", end-begin);
     
 }