Andriy Makukha
/
football_project_wo_output
football_project_wo_output
Fork of football_project by
Diff: main.cpp
- Revision:
- 24:ff54dec20f55
- Parent:
- 22:f58d4b441aba
- Parent:
- 23:26f27c462976
- Child:
- 28:8e74ddc4f70f
--- a/main.cpp Tue Dec 08 12:05:18 2015 +0000 +++ b/main.cpp Mon Dec 14 14:32:59 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 @@ -128,7 +128,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. @@ -553,9 +553,9 @@ { static int foo; foo++; -#if BLENANO +//#if BLENANO led0 = !led0; -#endif +//#endif led1 = !led1; led2 = !led2; // rts = !rts; @@ -664,7 +664,7 @@ // DigitalOut *buzzPin = new DigitalOut(p20); // *buzzPin = 1; setup(); - //radio_init(); + radio_init(); tmr.start(); // Main Loop @@ -691,8 +691,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();