![](/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: vz_protocol.cpp
- Revision:
- 63:0d95da692bb4
- Parent:
- 58:af7e8788f106
- Child:
- 67:cdedc64d9921
diff -r 07e5bdc9f8f7 -r 0d95da692bb4 vz_protocol.cpp --- a/vz_protocol.cpp Tue Oct 28 11:32:06 2014 +0000 +++ b/vz_protocol.cpp Tue Oct 28 12:44:45 2014 +0000 @@ -4,7 +4,6 @@ extern DigitalOut led2; extern DigitalOut led4; -NTPClient ntp; uint16_t pkg_ckserr = 0; uint16_t pkg_cksok = 0; @@ -43,7 +42,8 @@ } */ - if( cb_buffer[ 6 ] == __FLOOD__ ) { + if( cb_buffer[ 6 ] == __FLOOD__ ){ + flood_counter++; static uint8_t flood_cnt = 0; static uint8_t first_run_flag = 0; static Timer t; @@ -226,13 +226,13 @@ led2 = !led2; struct tm ts; //int ntp_result = ntp.setTime( "200.192.232.8" ); - int ntp_result = ntp.setTime( "200.192.232.8", 123, 3 ); - if( ntp_result == 0 ){ + //int ntp_result = ntp.setTime( "200.192.232.8", 123, 3 ); + //if( ntp_result == 0 ){ time_t seconds; // seconds = time(NULL); time( &seconds ); ts = *localtime( &seconds ); - } + //} int ano = ts.tm_year + 1900; int mes = ts.tm_mon + 1;