Browse Source
better default multiplier for ESP32 RAK
pull/1925/head
Andy Shinn
9 months ago
committed by
Wessel Nieboer
No known key found for this signature in database
GPG Key ID: 929C8E45E33B5FD2
2 changed files with
2 additions and
2 deletions
-
variants/rak11200/RAK11200Board.cpp
-
variants/rak11200/RAK11200Board.h
|
|
|
@ -28,7 +28,7 @@ uint16_t RAK11200Board::getBattMilliVolts() { |
|
|
|
} |
|
|
|
raw = raw / BATTERY_SAMPLES; |
|
|
|
|
|
|
|
return (ADC_MULTIPLIER * raw * 1000) / 4096; |
|
|
|
return (ADC_MULTIPLIER * raw) / 4096; |
|
|
|
} |
|
|
|
|
|
|
|
const char* RAK11200Board::getManufacturerName() const { |
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ |
|
|
|
#define P_LORA_MOSI 25 // GPIO25 (ESP32 pin 10 -> SPI_MOSI)
|
|
|
|
#define SX126X_POWER_EN 27 // GPIO27 (ESP32 pin 12 -> IO2)
|
|
|
|
#define PIN_VBAT_READ 36 // WB_A0 for battery reading
|
|
|
|
#define ADC_MULTIPLIER 1.8 // Adjusted for ESP32 ADC and voltage divider
|
|
|
|
#define ADC_MULTIPLIER (3 * 1.73 * 1.110 * 1000) |
|
|
|
|
|
|
|
class RAK11200Board : public ESP32Board { |
|
|
|
|
|
|
|
|