football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Revision:
23:26f27c462976
Parent:
19:afcbb425b3cf
Child:
24:ff54dec20f55
--- a/main.cpp	Tue Dec 01 16:03:15 2015 +0000
+++ b/main.cpp	Mon Dec 14 14:24:10 2015 +0000
@@ -38,7 +38,6 @@
  */
 #include <cstdarg>
 #include <cstdio>
-
 #include "mbed.h"
 // #include "rtos.h"
 #include "BLEDevice.h"
@@ -51,9 +50,10 @@
 #include "MTSSerialFlowControl.h"
 #include "PhoneAppIO.h"
 
+#include "types.h"
 #include "TA.h"
 
-#define NEED_CONSOLE_OUTPUT 0 /* Set this if you need debug messages on the console;
+#define NEED_CONSOLE_OUTPUT 1 /* Set this if you need debug messages on the console;
                                * it will have an impact on code-size and power consumption. */
 
 #define LOOPBACK_MODE       0  // Loopback mode
@@ -119,7 +119,7 @@
 // DigitalOut led1( P0_3,  0 );                  // TA Baseboard  High=On  (OK on Nano: Alt RxD)
 // DigitalOut led1( (trSwp ? P0_4 : P0_3), 0 );  // TA Baseboard  High=On  (And don't use P0_4 on Nano)
 
-DigitalOut buzz( P0_20, 1 );                  // TA New Baseboard  Low=On  (OK on Nano: NC)
+//DigitalOut buzz( P0_20, 1 );                  // TA New Baseboard  Low=On  (OK on Nano: NC)
 
 // App timer, app scheduler, and pstorage are already setup by bootloader.
 
@@ -473,9 +473,9 @@
 {
     static int foo;
     foo++;
-#if BLENANO
+//#if BLENANO
     led0 = !led0;
-#endif
+//#endif
     led1 = !led1;
     led2 = !led2;
 //    buzz = (foo & 2)>>1;
@@ -599,7 +599,7 @@
 //    DigitalOut *buzzPin = new DigitalOut(p20);
 //    *buzzPin = 1;
     setup();
-    //radio_init();
+    radio_init();
     tmr.start();
     
     // Main Loop
@@ -626,8 +626,10 @@
 ***/
 
 /**/    int bytes = MIN( PHTODEV_BUF_LEN, phoneP->readable() );
-/**/    getRadioInput( phoneToDev, phoneP->read( phoneToDev, bytes, 1 ) );
-
+/**/
+#ifdef MASTER    
+    getRadioInput( phoneToDev, phoneP->read( phoneToDev, bytes, 1 ) );
+#endif
         loop();
         //radio_loop();