This commit is contained in:
Gerolf Ziegenhain 2016-10-05 18:56:58 +02:00
parent 1a648e1cff
commit 8e7ce33e3b
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#define SIZE_COMMAND_PACKET 4
#define SIZE_DATA_PACKET 496
#define SIZE_DATA_PACKET_PAYLOAD 492 // = SIZE_DATA_PACKET - SIZE_COMMAND_PACKET
#define TX_RETRIES 3 // how often will the udp packet be sent?
#define SIZE_ID 128
#define SIZE_STATUS 128

View File

@ -334,7 +334,8 @@ int main(int argc, char *argv[])
if(tx_data_packet.n > 1 ){
tx_sequence++;
tx_data_packet.sequence = tx_sequence;
for(i = 0; i < 5; i++) send(fd_socket, &tx_data_packet, SIZE_DATA_PACKET, 0);
for(i = 0; i < TX_RETRIES; i++)
send(fd_socket, &tx_data_packet, SIZE_DATA_PACKET, 0);
#if DEBUG
printf("irmc: sent data packet.\n");
#endif
@ -350,7 +351,7 @@ int main(int argc, char *argv[])
#endif
#ifdef RASPI
if(digitalRead(5)==1){
if(digitalRead(TX_RASPI_PIN)==1){
txloop();
tx_timer = TX_WAIT;
message(1);