Skip to content

Commit

Permalink
makeDetailsMask() blanksAtEnd (q21c)
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Feb 15, 2024
1 parent 234f9bc commit 5e089ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,10 @@ static uint16_t GraphMeterMode_makeDetailsMask(const GraphColorComputeState* pre
if ((uint8_t)numDots % 2 == 0) {
distance -= 0.5;
}
unsigned int dotPosition = (unsigned int)(int) ceil(distance) + (unsigned int)(int)numDots / 2;
if (dotPosition < 8) {
blanksAtEnd = (uint8_t)(8 - dotPosition);
distance = ceil(distance);
blanksAtEnd = (uint8_t)(8 - (unsigned int)(int)numDots / 2);
if (blanksAtEnd > (unsigned int)(int)distance) {
blanksAtEnd -= (uint8_t)distance;
} else {
blanksAtEnd = 0;
}
Expand Down

0 comments on commit 5e089ee

Please sign in to comment.