![](/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
flood.cpp
- Committer:
- klauss
- Date:
- 2015-09-10
- Revision:
- 135:2f4290590e51
- Parent:
- 125:8ff4dc96ad58
File content as of revision 135:2f4290590e51:
#include "flood.h" bool pflood = false; Timer tflood; int floodcount = 0; void flood (){ if( tflood.read_us() > floodcount ){ while( tflood.read_us() > floodcount ){ floodcount += 20000; } uint8_t Bflood[300]; uint8_t j; static uint8_t flood_start = 0; j = flood_start; for (int i = 0; i < 300; i++ ) { Bflood[i] = j++; } flood_start++; Bflood[ TYPE_PLACE ] = FLOOD; Bflood[ CB_BUFFER_SIZE - 4 ] = 0x5a; Bflood[ CB_BUFFER_SIZE - 3 ] = 0x56; Bflood[ CB_BUFFER_SIZE - 2 ] = 0x5a; Bflood[ CB_BUFFER_SIZE - 1 ] = 0xe1; send2callboxes( Bflood ); if( debug_uart3 and enable_flood ) pc.printf("F"); if( tcp_session and enable_flood ){ tcp_client.send_all( "F", strlen( "F" ) ); } } }