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
5 changes: 4 additions & 1 deletion variants/heltec_v3/HeltecV3Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#ifndef PIN_ADC_CTRL // set in platformio.ini for Heltec Wireless Tracker (2)
#define PIN_ADC_CTRL 37
#endif
#ifndef ADC_MULTIPLIER //default ADC multiplier
#define ADC_MULTIPLIER 1
#endif
#define PIN_ADC_CTRL_ACTIVE LOW
#define PIN_ADC_CTRL_INACTIVE HIGH

Expand Down Expand Up @@ -88,7 +91,7 @@ class HeltecV3Board : public ESP32Board {

digitalWrite(PIN_ADC_CTRL, !adc_active_state);

return (5.42 * (3.3 / 1024.0) * raw) * 1000;
return (5.42 * (3.3 / 1024.0) * raw) * 1000 * ADC_MULTIPLIER;
}

const char* getManufacturerName() const override {
Expand Down
1 change: 1 addition & 0 deletions variants/heltec_wireless_paper/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ build_flags =
;-D PIN_BOARD_SCL=18 ; same GPIO as P_LORA_TX_LED
-D PIN_USER_BTN=0
-D PIN_VEXT_EN=45
-D ADC_MULTIPLIER=1.55
-D PIN_VBAT_READ=20
-D PIN_ADC_CTRL=19
-D SX126X_DIO2_AS_RF_SWITCH=true
Expand Down