mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
move LilyGoTLoraBoard.h to variants, use template in platformio.ini, cleanup
This commit is contained in:
parent
da52d08168
commit
69cddbca4e
3 changed files with 7 additions and 22 deletions
|
|
@ -1,24 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "ESP32Board.h"
|
||||
|
||||
// LILYGO T-LoRa V2.1-1.6 board with SX1276
|
||||
class LilyGoTLoraBoard : public ESP32Board {
|
||||
public:
|
||||
const char* getManufacturerName() const override {
|
||||
return "LILYGO T-LoRa V2.1-1.6";
|
||||
}
|
||||
|
||||
uint16_t getBattMilliVolts() override {
|
||||
analogReadResolution(12);
|
||||
|
||||
uint32_t raw = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
raw += analogReadMilliVolts(PIN_VBAT_READ);
|
||||
}
|
||||
raw = raw / 8;
|
||||
|
||||
return (2 * raw);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue