Andriy Makukha
/
football_project_wo_output
football_project_wo_output
Fork of football_project by
Diff: main.cpp
- Revision:
- 60:d1fad57e8bfb
- Parent:
- 59:297133497153
- Child:
- 61:dd7002ceea96
--- a/main.cpp Sat Jan 16 17:31:27 2016 +0000 +++ b/main.cpp Sat Jan 16 19:11:49 2016 +0000 @@ -138,11 +138,6 @@ static DigitalOut led1( P0_21, 0 ); // TA New Baseboard High=On (OK on Nano: NC) DigitalOut led2( P0_22, 1 ); // TA New Baseboard High=On (OK on Nano: NC) -// 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) - int tickTock = 0; // Counter used by periodicCallback(). class ChgChg : public InterruptIn @@ -193,7 +188,6 @@ // mts::MTSSerialFlowControl pcfc( (trSwp ? SERRX : SERTX), (trSwp ? SERTX : SERRX), RTS_PIN_NUMBER, CTS_PIN_NUMBER, 384, 2688 ); //mts::MTSSerial pcfc( (trSwp ? SERRX : SERTX), (trSwp ? SERTX : SERRX), 128, 64, RTS_PIN_NUMBER, NC ); // 256, 1280 // 256, 2560 -Serial pc(SERTX,SERRX); uint8_t txPayload[TXRX_BUF_LEN] = { 0 }; @@ -313,11 +307,6 @@ const Gap::address_t peerAddr, const Gap::ConnectionParams_t *connParams ) { connected = true; - - // DEBUG( "Connected!\n\r" ); - -// char dummy; -// writeToPhone( "Hi. Curr stack bot: 0x%08X\r\n", &dummy ); } void disconnectionCallback( Gap::Handle_t handle, Gap::DisconnectionReason_t reason ) @@ -326,9 +315,6 @@ updateBatt( getBattLevel() ); - // DEBUG( "Disconnected!\n\r" ); - // DEBUG( "Restarting the advertising process\n\r" ); - ble.startAdvertising(); ta.post_color(0); @@ -358,10 +344,7 @@ va_list arg; va_start( arg, format ); -/**/phoneP->vprintf( format, arg ); - -/**/// Also write same to serial port... TODO -/**/ // pcfc.vprintf( format, arg ); + phoneP->vprintf( format, arg ); va_end(arg); } @@ -485,25 +468,9 @@ } } -/* -void led_thread( void const *args ) -{ - while( true ) - { - led0 = !led0; - led1 = !led1; - Thread::wait( 1000 ); - } -} -*/ - - int main( void ) { Ticker ticker; -////// ticker.attach( periodicCallback, 0.125 /** 0.2 **/ /** 0.5 **/ /* 1 */ ); - - pc.baud( 57600 ); ble.init(); @@ -552,8 +519,6 @@ unsigned long lastMillis = millis(); unsigned long currMillis = lastMillis +25; - int counter = 0; - // Main Loop while( true ) {