File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -688,6 +688,7 @@ board_build.ldscript = boards/nrf52840_s140_v6.ld
688688build_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
Original file line number Diff line number Diff 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) {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -11,6 +11,4 @@ const uint32_t g_ADigitalPinMap[] = {
1111
1212void initVariant ()
1313{
14- pinMode (LED_BUILTIN, OUTPUT);
15- ledOff (LED_BUILTIN);
1614}
You can’t perform that action at this time.
0 commit comments