Skip to content

Commit 95ce8ba

Browse files
committed
Suppress LoRa transmission during survey-in
1 parent e0ba079 commit 95ce8ba

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Firmware/RTK_Everywhere/LoRa.ino

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ enum LoraState
5050
{
5151
LORA_OFF = 0,
5252
LORA_NOT_STARTED,
53+
LORA_TX_SETTLING, // Do not transmit while surveying in to avoid RF cross-talk
5354
LORA_TX, // Send RTCM over LoRa when it's received from UM980 (share UART0 with prints)
5455
LORA_RX_DEDICATED, // No USB cable so disconnect from USB
5556
LORA_RX_SHARED, // USB cable connected so share UART0 between prints and data
@@ -90,11 +91,9 @@ void updateLora()
9091
if (inBaseMode())
9192
{
9293
if (settings.debugLora == true)
93-
systemPrintln("LoRa: Moving to TX");
94-
95-
loraSetupTransmit();
94+
systemPrintln("LoRa: Moving to TX Settling");
9695

97-
loraState = LORA_TX;
96+
loraState = LORA_TX_SETTLING;
9897
}
9998
else if (isUsbAttached() == false)
10099
{
@@ -123,6 +122,21 @@ void updateLora()
123122
}
124123
break;
125124

125+
case (LORA_TX_SETTLING):
126+
// While the survey is running, avoid transmitting over LoRa to allow maximum GNSS reception
127+
128+
if (gnssIsSurveyComplete() == true)
129+
{
130+
if (settings.debugLora == true)
131+
systemPrintln("LoRa: Moving to TX");
132+
133+
loraSetupTransmit();
134+
135+
loraState = LORA_TX;
136+
}
137+
138+
break;
139+
126140
case (LORA_TX):
127141
// Incoming RTCM to send out over LoRa is handled by processUart1Message() task and loraProcessRTCM()
128142
if (inMainMenu == false)

0 commit comments

Comments
 (0)