![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: main.cpp
- Revision:
- 49:4837ed2aad6b
- Parent:
- 48:195c97f12e8e
- Child:
- 52:12930cef17c4
diff -r 195c97f12e8e -r 4837ed2aad6b main.cpp --- a/main.cpp Mon Oct 20 16:13:10 2014 +0000 +++ b/main.cpp Mon Oct 20 16:32:12 2014 +0000 @@ -87,6 +87,7 @@ udp_timer.start(); send_msg("Ready"); while( true ){ + //FIXME colocar uma condicao aqui prompt_process( NULL ); wdt.kick(); if (pcks_s == 1){ @@ -167,10 +168,12 @@ } //---------------------- if( t.read() > 5 ){ - static int count = 0; + static uint8_t count = 0; + /* static int test_ext = 870; static int test_port = 5170; static bool main_test = false; + */ //send_msg("from_eth = %s - tcp_session = %s", ( from_eth ) ? "true" : "false", ( tcp_session ) ? "true" : "false" ); if( debug_alive ){ send_msg("Registred %d CBx", v_cb->size() ); @@ -194,7 +197,7 @@ //<><><><><><><><><><> count++; - if( !( count % 3 ) ){ + if( !( count % 15 ) ){ if( eth_status ){ wdt.kick(); //eth_status = __init_eth__( ð ); @@ -207,10 +210,11 @@ } } } - if( count == 4 ){ + //if( count == 4 ){ //debug_msg("Colocar simulacoes de cbx aqui"); - main_test = true; - } + //main_test = true; + //} + /* if( main_test ){ send_msg("Request registry from %d", test_ext ); data = buffer; @@ -220,6 +224,7 @@ //if( test_ext == 881 ) main_test = false; main_test = false; } + */ /* if( count == 5 * 2 ){ //debug_msg("Colocar simulacoes de cbx aqui"); @@ -477,7 +482,7 @@ if( v_call->size() == 0 ){ if (flag == 0) { flag = 1; } ts->reset(); - }else { + }else{ if (flag == 1) { flag = 0; } }