From 3b2f231db07ac25e80d9e6fabf251e79d943f48f Mon Sep 17 00:00:00 2001 From: richonguzman Date: Sat, 11 Feb 2023 18:18:34 -0300 Subject: [PATCH] beaconupdate1 --- src/Lora_APRS_iGate_DIY.cpp | 6 +++--- src/iGate_config.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Lora_APRS_iGate_DIY.cpp b/src/Lora_APRS_iGate_DIY.cpp index 8f3160b..d0e5c4a 100644 --- a/src/Lora_APRS_iGate_DIY.cpp +++ b/src/Lora_APRS_iGate_DIY.cpp @@ -112,8 +112,7 @@ void setup() { void loop() { String receivedPacket = ""; - uint32_t lastTx = millis() - lastTxTime; - bool beacon_update = true; + static bool beacon_update = true; int packetSize = LoRa.parsePacket(); if (packetSize) { @@ -124,9 +123,10 @@ void loop() { valida_y_procesa_packet(receivedPacket); //Serial.println("Mensaje Recibido : " + String(receivedPacket)); } + uint32_t lastTx = millis() - lastTxTime; if (lastTx >= BeaconInterval) { beacon_update = true; - } + } if (beacon_update) { Serial.println("enviando Beacon Estacion/iGate"); diff --git a/src/iGate_config.h b/src/iGate_config.h index ccda58a..b445e8d 100644 --- a/src/iGate_config.h +++ b/src/iGate_config.h @@ -4,7 +4,7 @@ #define WIFI_SSID "Richon" #define WIFI_PASSWORD "k4fPnmg5qnyf" -#define BeaconInterval 15*60*1000 // 15 minutes +#define BeaconInterval 900000 // 15 minutes = 900000 seg String iGate_Callsign = "CD2RXU-10"; String passcode_igate = "23201";