mirror of
https://github.com/lora-aprs/LoRa_APRS_Tracker.git
synced 2025-12-06 07:12:15 +01:00
fix cppcheck in power management
This commit is contained in:
parent
afe843f393
commit
9ffc9bb5ef
|
|
@ -53,7 +53,7 @@ void PowerManagement::decativateOLED()
|
||||||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
|
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::activateMeasurement()
|
void PowerManagement::activateMeasurement()
|
||||||
{
|
{
|
||||||
axp.adc1Enable(AXP202_BATT_CUR_ADC1 |
|
axp.adc1Enable(AXP202_BATT_CUR_ADC1 |
|
||||||
|
|
@ -61,6 +61,7 @@ void PowerManagement::activateMeasurement()
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::deactivateMeasurement()
|
void PowerManagement::deactivateMeasurement()
|
||||||
{
|
{
|
||||||
axp.adc1Enable(AXP202_BATT_CUR_ADC1 |
|
axp.adc1Enable(AXP202_BATT_CUR_ADC1 |
|
||||||
|
|
@ -68,11 +69,13 @@ void PowerManagement::deactivateMeasurement()
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
double PowerManagement::getBatteryVoltage()
|
double PowerManagement::getBatteryVoltage()
|
||||||
{
|
{
|
||||||
return axp.getBattVoltage() / 1000.0;
|
return axp.getBattVoltage() / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
double PowerManagement::getBatteryChargeDischargeCurrent()
|
double PowerManagement::getBatteryChargeDischargeCurrent()
|
||||||
{
|
{
|
||||||
if(axp.isChargeing())
|
if(axp.isChargeing())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue