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:
- 79:9bc12aa305a9
- Parent:
- 78:1353744f01e1
- Child:
- 81:3656f00ab3db
diff -r 1353744f01e1 -r 9bc12aa305a9 vz_protocol.cpp --- a/vz_protocol.cpp Tue Dec 16 12:13:01 2014 +0000 +++ b/vz_protocol.cpp Tue Dec 16 16:50:25 2014 +0000 @@ -106,6 +106,12 @@ e_msb = cb_buffer[ 0 ]; e_lsb = cb_buffer[ 1 ]; *ext = e_msb << 8 | e_lsb; + + //restriçao de controle para cbx malucos + if( *ext < MIN_EXT || *ext > MAX_EXT ){ + out_of_range++; + return( NULL ); + } p_msb = cb_buffer[ 2 ]; p_lsb = cb_buffer[ 3 ];