Ken Van Hoeylandt 1627b9fa85
Merge develop into main (#316)
- Updated all boards to use `hal::Configuration.createDevices`
- Updated all boards to use new directory structure and file naming convention
- Refactored `Xpt2046SoftSpi` driver.
- Created `Axp2101Power` device in `Drivers/AXP2101`
- Removed global static instances from some drivers (instances that kept a reference to the Device*)
- Improved `SystemInfoApp` UI: better memory labels, hide external memory bar when there's no PSRAM
- Fix for HAL: register touch devices after displays are registered
- Fix for Boot splash hanging on WiFi init: unlock file lock after using it
2025-09-03 22:05:28 +02:00

26 lines
713 B
C++

#pragma once
#include "Tactility/hal/power/PowerDevice.h"
#include <Bq27220.h>
#include <memory>
using tt::hal::power::PowerDevice;
class TpagerPower : public PowerDevice {
std::shared_ptr<Bq27220> gauge;
public:
TpagerPower(const std::shared_ptr<Bq27220>& bq) : gauge(bq) {}
~TpagerPower();
std::string getName() const final { return "T-LoRa Pager Power measument"; }
std::string getDescription() const final { return "Power measurement interface via I2C fuel gauge"; }
bool supportsMetric(MetricType type) const override;
bool getMetric(MetricType type, MetricData& data) override;
bool supportsPowerOff() const override { return true; }
void powerOff() override;
};