Skip to content

Commit 603d1c5

Browse files
authored
Merge pull request #778 from LeeLeahy2/no-lora
Build with COMPILE_LORA commented out
2 parents 992f11d + 05b9bb8 commit 603d1c5

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,22 @@ void espNowUpdate() {}
225225

226226
#endif // COMPILE_ESPNOW
227227

228+
//----------------------------------------
229+
// LoRa
230+
//----------------------------------------
231+
232+
#ifndef COMPILE_LORA
233+
void beginLoraFirmwareUpdate() {}
234+
bool checkUpdateLoraFirmware() {return false;}
235+
bool createLoRaPassthrough() {return false;}
236+
void loraGetVersion() {}
237+
void loraPowerOff() {}
238+
void loraProcessRTCM(uint8_t *rtcmData, uint16_t dataLength) {}
239+
void muxSelectUm980() {}
240+
void muxSelectUsb() {}
241+
void updateLora() {}
242+
#endif // COMPILE_LORA
243+
228244
//----------------------------------------
229245
// WiFi
230246
//----------------------------------------

Firmware/RTK_Everywhere/LoRa.ino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LoRa.ino
3636
ESP32 (UART2) <-> Switch 3 B1 <-> STM32 LoRa (UART2)
3737
3838
UART0 on the STM32 is used for pushing data across the link.
39-
UART2 on the STM32 is used for configuration.
39+
UART2 on the STM32 is used for configuration.
4040
4141
Printing:
4242
On Torch, Serial must be used to send and receive data from the radio. At times, this requires disconnecting from the USB interface.
@@ -54,6 +54,8 @@ LoRa.ino
5454
5555
------------------------------------------------------------------------------*/
5656

57+
#ifdef COMPILE_LORA
58+
5759
// See menuRadio() to get LoRa Settings
5860

5961
// Define the NTRIP client states
@@ -73,7 +75,6 @@ enum LoraState
7375

7476
static volatile uint8_t loraState = LORA_OFF;
7577

76-
char loraFirmwareVersion[25] = {'\0'};
7778
int loraBytesSent = 0;
7879

7980
HardwareSerial *SerialForLoRa; // Don't instantiate until we know the platform. May compete with SerialForTilt
@@ -877,7 +878,7 @@ uint16_t loraAvailable()
877878
return (Serial.available());
878879
else if (productVariant == RTK_FLEX)
879880
return (SerialForLoRa->available());
880-
881+
881882
systemPrintln("loraAvailable - invalid ProductVariant");
882883
return 0;
883884
}
@@ -891,4 +892,6 @@ uint16_t loraRead()
891892

892893
systemPrintln("loraRead - invalid ProductVariant");
893894
return 0;
894-
}
895+
}
896+
897+
#endif // COMPILE_LORA

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
#define COMPILE_WIFI // Comment out to remove WiFi functionality
8989
#define COMPILE_ETHERNET // Comment out to remove Ethernet (W5500) support
9090
#define COMPILE_CELLULAR // Comment out to remove cellular modem support
91+
#define COMPILE_LORA // COmment out to remove LoRa functionality
9192

9293
#ifdef COMPILE_BT
9394
#define COMPILE_AUTHENTICATION // Comment out to disable MFi authentication
@@ -982,6 +983,7 @@ int16_t *commandIndex;
982983

983984
bool usbSerialIsSelected = true; // Goes false when switch U18 is moved from CH34x to LoRa
984985
unsigned long loraLastIncomingSerial; // Last time a user sent a serial command. Used in LoRa timeouts.
986+
char loraFirmwareVersion[25] = {'\0'};
985987

986988
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
987989

Firmware/RTK_Everywhere/check.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ sed -i 's|#define COMPILE_ETHERNET|//#define COMPILE_ETHERNET|' RTK_Everywhere.i
4040
make
4141
git reset --hard --quiet HEAD
4242

43+
# LoRa
44+
sed -i 's|#define COMPILE_LORA|//#define COMPILE_LORA|' RTK_Everywhere.ino
45+
make
46+
git reset --hard --quiet HEAD
47+
4348
# WiFi
4449
sed -i 's|#define COMPILE_WIFI|//#define COMPILE_WIFI|' RTK_Everywhere.ino
4550
make

0 commit comments

Comments
 (0)