documentation checked and edit

for all files in lib folder
This commit is contained in:
2023-10-12 18:45:12 +02:00
parent 61a95e4601
commit db74898b72
41 changed files with 1030 additions and 569 deletions
+5 -5
View File
@@ -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()