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:
- 98:43b45f26b430
- Parent:
- 92:92df17f538a8
- Child:
- 100:09a23fcd3bdf
diff -r 8985817e8847 -r 43b45f26b430 vz_protocol.cpp --- a/vz_protocol.cpp Sat Jan 10 23:59:51 2015 +0000 +++ b/vz_protocol.cpp Sun Jan 11 03:30:47 2015 +0000 @@ -133,11 +133,19 @@ return( NULL ); } + //if( + //( ( cb_buffer[ 0 ] == cb_buffer[ 2 ] ) || ( cb_buffer[ 1 ] == cb_buffer[ 3 ] ) ) ) + //debug_msg("[0](%u),[1](%u),[2](%u),[3](%u)", cb_buffer[ 0 ], cb_buffer[ 1 ], cb_buffer[ 2 ], cb_buffer[ 3 ] ); + p_msb = cb_buffer[ 2 ]; p_lsb = cb_buffer[ 3 ]; *port = p_msb << 8 | p_lsb; + if( debug_port_match ) if( *ext == *port ) debug_msg("%u:%u", *ext, *port ); + *type = cb_buffer[ 6 ]; + + if( ( ( *port < 5000 ) || ( *port >= ( 5000 + __MAX_CB_IN_A_BRANCH__ ) ) && ( *type == __TELEMETRY__ ) ) ) return NULL; return( cb_buffer + __VZ_HEADER_OFFSET__ ); }