mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-06 06:55:07 +00:00
Battery Monitor for T-Beams
This commit is contained in:
parent
e9bb0391f2
commit
c5217842ff
6 changed files with 64 additions and 36 deletions
|
|
@ -21,6 +21,22 @@ extern Configuration Config;
|
|||
|
||||
namespace POWER_Utils {
|
||||
|
||||
double getBatteryVoltage() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
return (PMU.getBattVoltage() / 1000.0);
|
||||
#else
|
||||
return 0.0;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isBatteryConnected() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
return PMU.isBatteryConnect();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void activateMeasurement() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
PMU.disableTSPinMeasure();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue