Add MAX17048 lipo fuel gauge (#4851)

* Initial commit

* Update MAX17048Sensor.cpp

* Update EnvironmentTelemetry.cpp

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
David
2024-09-25 20:34:53 +10:00
committed by GitHub
parent 1129c92974
commit 40b3dbaa70
11 changed files with 449 additions and 19 deletions

View File

@@ -48,6 +48,11 @@ extern INA219Sensor ina219Sensor;
extern INA3221Sensor ina3221Sensor;
#endif
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
#include "modules/Telemetry/Sensor/MAX17048Sensor.h"
extern MAX17048Sensor max17048Sensor;
#endif
#if HAS_RAKPROT && !defined(ARCH_PORTDUINO)
#include "../variants/rak2560/RAK9154Sensor.h"
extern RAK9154Sensor rak9154Sensor;
@@ -82,6 +87,8 @@ class Power : private concurrency::OSThread
bool axpChipInit();
/// Setup a simple ADC input based battery sensor
bool analogInit();
/// Setup a Lipo battery level sensor
bool lipoInit();
private:
// open circuit voltage lookup table