documentation checked and edit
for all files in lib folder
This commit is contained in:
@@ -37,12 +37,12 @@ void Battery::run()
|
||||
this->readAdcToBuf();
|
||||
this->loopCounter++;
|
||||
|
||||
if (this->loopCounter >= this->calulationDelayMultiplier)
|
||||
if (this->loopCounter >= this->calculateDelayMultiplier)
|
||||
{
|
||||
this->calculateBatteryVoltage();
|
||||
this->calculateBatteryPercent();
|
||||
this->loopCounter = 0;
|
||||
this->calculatetNewValues = true;
|
||||
this->calculatedNewValues = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,12 +89,12 @@ bool Battery::isBatteryLow(double voltage) const
|
||||
|
||||
bool Battery::isNewValue()
|
||||
{
|
||||
if (!this->calculatetNewValues)
|
||||
if (!this->calculatedNewValues)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this->calculatetNewValues = false;
|
||||
this->calculatedNewValues = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ double Battery::calculateInputVoltage()
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -this->adcCurveCoeficient[0] * pow(reading, 4) + this->adcCurveCoeficient[1] * pow(reading, 3) - this->adcCurveCoeficient[2] * pow(reading, 2) + this->adcCurveCoeficient[3] * reading + this->adcCurveCoeficient[4];
|
||||
return -this->adcCurveCoefficient[0] * pow(reading, 4) + this->adcCurveCoefficient[1] * pow(reading, 3) - this->adcCurveCoefficient[2] * pow(reading, 2) + this->adcCurveCoefficient[3] * reading + this->adcCurveCoefficient[4];
|
||||
}
|
||||
|
||||
void Battery::calculateBatteryVoltage()
|
||||
|
||||
Reference in New Issue
Block a user