NFC: Use std::size() instead of define.
This commit is contained in:
parent
c1f0b9ea6f
commit
733a566172
@ -37,11 +37,11 @@ void DisplayGraphicDiagramClass::averageLoop()
|
|||||||
|
|
||||||
void DisplayGraphicDiagramClass::dataPointLoop()
|
void DisplayGraphicDiagramClass::dataPointLoop()
|
||||||
{
|
{
|
||||||
if (_graphValuesCount >= CHART_WIDTH) {
|
if (_graphValuesCount >= std::size(_graphValues)) {
|
||||||
for (uint8_t i = 0; i < CHART_WIDTH - 1; i++) {
|
for (uint8_t i = 0; i < std::size(_graphValues) - 1; i++) {
|
||||||
_graphValues[i] = _graphValues[i + 1];
|
_graphValues[i] = _graphValues[i + 1];
|
||||||
}
|
}
|
||||||
_graphValuesCount = CHART_WIDTH - 1;
|
_graphValuesCount = std::size(_graphValues) - 1;
|
||||||
}
|
}
|
||||||
if (_iRunningAverageCnt != 0) {
|
if (_iRunningAverageCnt != 0) {
|
||||||
_graphValues[_graphValuesCount++] = _iRunningAverage / _iRunningAverageCnt;
|
_graphValues[_graphValuesCount++] = _iRunningAverage / _iRunningAverageCnt;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user