Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/helpers/RefCountedDigitalPin.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ class RefCountedDigitalPin {
digitalWrite(_pin, _active);
}
}

void release() {
if (_claims == 0) return; // avoid negative _claims

_claims--;
if (_claims == 0) {
digitalWrite(_pin, !_active);
Expand Down
2 changes: 1 addition & 1 deletion variants/heltec_v4/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build_flags =
-D P_LORA_PA_TX_EN=46 ;enable tx
-D PIN_USER_BTN=0
-D PIN_VEXT_EN=36
-D PIN_VEXT_EN_ACTIVE=LOW
-D PIN_VEXT_EN_ACTIVE=HIGH
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output
-D SX126X_DIO2_AS_RF_SWITCH=true
Expand Down
2 changes: 1 addition & 1 deletion variants/heltec_v4/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
#endif

#ifdef DISPLAY_CLASS
DISPLAY_CLASS display(&(board.periph_power));
DISPLAY_CLASS display(NULL);
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
#endif

Expand Down