From 44749470a451ca7bf602cfed12f5a64e1ef9bea2 Mon Sep 17 00:00:00 2001
From: Marlon Spangenberg <25596663+aHVzY2g@users.noreply.github.com>
Date: Tue, 14 Jul 2020 16:16:49 +0200
Subject: [PATCH] fix #272 add support for tlora-v2-1-1.6
---
platformio.ini | 14 ++++++++++----
src/configuration.h | 35 ++++++++++++++++++++++++++++-------
2 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/platformio.ini b/platformio.ini
index 9f73a1aa1..49caac25b 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -115,18 +115,24 @@ build_flags =
extends = esp32_base
board = heltec_wifi_lora_32_V2
-[env:ttgo-lora32-v1]
+[env:tlora-v1]
extends = esp32_base
board = ttgo-lora32-v1
build_flags =
- ${esp32_base.build_flags} -D TTGO_LORA_V1
+ ${esp32_base.build_flags} -D TLORA_V1
; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works
-[env:ttgo-lora32-v2]
+[env:tlora-v2]
extends = esp32_base
board = ttgo-lora32-v1
build_flags =
- ${esp32_base.build_flags} -D TTGO_LORA_V2
+ ${esp32_base.build_flags} -D TLORA_V2
+
+[env:tlora-v2-1-1.6]
+extends = esp32_base
+board = ttgo-lora32-v1
+build_flags =
+ ${esp32_base.build_flags} -D TLORA_V2_1_16
; The Heltec Cubecell plus
; IMPORTANT NOTE: This target doesn't yet work and probably won't ever work. I'm keeping it around for now.
diff --git a/src/configuration.h b/src/configuration.h
index d0ec7aad3..b24be94d8 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -211,9 +211,9 @@ along with this program. If not, see .
#define RF95_IRQ_GPIO 26
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
-#elif defined(TTGO_LORA_V1)
+#elif defined(TLORA_V1)
// This string must exactly match the case used in release file names or the android updater won't work
-#define HW_VENDOR "ttgo-lora32-v1"
+#define HW_VENDOR "tlora-v1"
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 36
@@ -232,9 +232,9 @@ along with this program. If not, see .
#define RF95_IRQ_GPIO 26 // IRQ line for the LORA radio
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
-#elif defined(TTGO_LORA_V2)
+#elif defined(TLORA_V2)
// This string must exactly match the case used in release file names or the android updater won't work
-#define HW_VENDOR "ttgo-lora32-v2"
+#define HW_VENDOR "tlora-v2"
#undef GPS_RX_PIN
#undef GPS_TX_PIN
@@ -248,14 +248,35 @@ along with this program. If not, see .
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED
-#define BUTTON_PIN \
- 0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
-// between this pin and ground
+#define BUTTON_PIN 0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one between this pin and ground
#define RESET_GPIO 14 // If defined, this pin will be used to reset the LORA radio
#define RF95_IRQ_GPIO 26 // IRQ line for the LORA radio
#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
+
+#elif defined(TLORA_V2_1_16)
+// This string must exactly match the case used in release file names or the android updater won't work
+#define HW_VENDOR "tlora-v2-1-1.6"
+
+#undef GPS_RX_PIN
+#undef GPS_TX_PIN
+#define GPS_RX_PIN 36
+#define GPS_TX_PIN 39
+
+#define I2C_SDA 21 // I2C pins for this board
+#define I2C_SCL 22
+
+#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
+
+#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
+#define LED_PIN 25 // If defined we will blink this LED
+#define BUTTON_PIN 12 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one between this pin and ground
+
+#define RESET_GPIO 23 // If defined, this pin will be used to reset the LORA radio
+#define RF95_IRQ_GPIO 26 // IRQ line for the LORA radio
+#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
+#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number
#endif
#ifdef ARDUINO_NRF52840_PCA10056