Size & speed optimisations

This commit is contained in:
Blaz Kristan
2024-07-11 21:22:58 +02:00
parent 1ec68c428a
commit cd1ede38a7
16 changed files with 72 additions and 70 deletions

View File

@@ -34,7 +34,7 @@ void _overlayAnalogClock()
}
if (analogClock5MinuteMarks)
{
for (byte i = 0; i <= 12; i++)
for (unsigned i = 0; i <= 12; i++)
{
unsigned pix = analogClock12pixel + roundf((overlaySize / 12.0f) *i);
if (pix > overlayMax) pix -= overlaySize;
@@ -91,7 +91,7 @@ void handleOverlayDraw() {
usermods.handleOverlayDraw();
if (analogClockSolidBlack) {
const Segment* segments = strip.getSegments();
for (uint8_t i = 0; i < strip.getSegmentsNum(); i++) {
for (unsigned i = 0; i < strip.getSegmentsNum(); i++) {
const Segment& segment = segments[i];
if (!segment.isActive()) continue;
if (segment.mode > 0 || segment.colors[0] > 0) {