Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
flood.cpp
00001 #include "flood.h" 00002 00003 bool pflood = false; 00004 00005 Timer tflood; 00006 int floodcount = 0; 00007 00008 void flood (){ 00009 if( tflood.read_us() > floodcount ){ 00010 while( tflood.read_us() > floodcount ){ 00011 floodcount += 20000; 00012 } 00013 uint8_t Bflood[300]; 00014 uint8_t j; 00015 static uint8_t flood_start = 0; 00016 j = flood_start; 00017 for (int i = 0; i < 300; i++ ) 00018 { 00019 Bflood[i] = j++; 00020 } 00021 00022 flood_start++; 00023 00024 Bflood[ TYPE_PLACE ] = FLOOD; 00025 Bflood[ CB_BUFFER_SIZE - 4 ] = 0x5a; 00026 Bflood[ CB_BUFFER_SIZE - 3 ] = 0x56; 00027 Bflood[ CB_BUFFER_SIZE - 2 ] = 0x5a; 00028 Bflood[ CB_BUFFER_SIZE - 1 ] = 0xe1; 00029 00030 send2callboxes( Bflood ); 00031 if( debug_uart3 and enable_flood ) pc.printf("F"); 00032 if( tcp_session and enable_flood ){ 00033 tcp_client.send_all( "F", strlen( "F" ) ); 00034 } 00035 } 00036 }
Generated on Tue Jul 12 2022 16:25:03 by
