Skip to content

Commit ae8fb5d

Browse files
author
Scott Powell
committed
* Heltec v3.2 VEXT fix
* Heltec T114 LED fix, (now flashes with LoRa TX)
1 parent cf17091 commit ae8fb5d

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ board_build.ldscript = boards/nrf52840_s140_v6.ld
688688
build_flags = ${nrf52840_t114.build_flags}
689689
-Ivariants/t114
690690
-DHELTEC_T114
691+
-D P_LORA_TX_LED=35
691692
-D RADIO_CLASS=CustomSX1262
692693
-D WRAPPER_CLASS=CustomSX1262Wrapper
693694
-D LORA_TX_POWER=22

src/helpers/HeltecV3Board.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class HeltecV3Board : public ESP32Board {
2929
ESP32Board::begin();
3030

3131
pinMode(PIN_ADC_CTRL, OUTPUT);
32-
//pinMode(PIN_VEXT_EN, OUTPUT);
32+
pinMode(PIN_VEXT_EN, OUTPUT);
33+
digitalWrite(PIN_VEXT_EN, LOW); // for V3.2 boards
3334

3435
esp_reset_reason_t reason = esp_reset_reason();
3536
if (reason == ESP_RST_DEEPSLEEP) {

src/helpers/nrf52/T114Board.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ void T114Board::begin() {
3232
Wire.begin();
3333
#endif
3434

35+
#ifdef P_LORA_TX_LED
36+
pinMode(P_LORA_TX_LED, OUTPUT);
37+
digitalWrite(P_LORA_TX_LED, HIGH);
38+
#endif
39+
3540
pinMode(SX126X_POWER_EN, OUTPUT);
3641
digitalWrite(SX126X_POWER_EN, HIGH);
3742
delay(10); // give sx1262 some time to power up

src/helpers/nrf52/T114Board.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ class T114Board : public mesh::MainBoard {
2828
void begin();
2929
uint8_t getStartupReason() const override { return startup_reason; }
3030

31+
#if defined(P_LORA_TX_LED)
32+
void onBeforeTransmit() override {
33+
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED on
34+
}
35+
void onAfterTransmit() override {
36+
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED off
37+
}
38+
#endif
39+
3140
#define BATTERY_SAMPLES 8
3241

3342
uint16_t getBattMilliVolts() override {

variants/t114/variant.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@ const uint32_t g_ADigitalPinMap[] = {
1111

1212
void initVariant()
1313
{
14-
pinMode(LED_BUILTIN, OUTPUT);
15-
ledOff(LED_BUILTIN);
1614
}

0 commit comments

Comments
 (0)