mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-04 14:08:36 +00:00
monitorMod1
This commit is contained in:
parent
83a39c2093
commit
4651938cb1
3 changed files with 12 additions and 13 deletions
|
|
@ -88,6 +88,16 @@ namespace POWER_Utils {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
void activateMeasurement() {
|
||||
PMU.disableTSPinMeasure();
|
||||
PMU.enableBattDetection();
|
||||
PMU.enableVbusVoltageMeasure();
|
||||
PMU.enableBattVoltageMeasure();
|
||||
PMU.enableSystemVoltageMeasure();
|
||||
}
|
||||
#endif
|
||||
|
||||
double getBatteryVoltage() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
return (PMU.getBattVoltage() / 1000.0);
|
||||
|
|
@ -102,17 +112,7 @@ namespace POWER_Utils {
|
|||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void activateMeasurement() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
PMU.disableTSPinMeasure();
|
||||
PMU.enableBattDetection();
|
||||
PMU.enableVbusVoltageMeasure();
|
||||
PMU.enableBattVoltageMeasure();
|
||||
PMU.enableSystemVoltageMeasure();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void activateGPS() {
|
||||
#ifdef HAS_AXP192
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue