Merge branch 'custom-effects' into mdev

This commit is contained in:
Ewowi
2022-08-31 20:58:44 +02:00
12 changed files with 2026 additions and 1976 deletions

View File

@@ -470,15 +470,8 @@ void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col)
// expand in circular fashion from center
if (i==0)
setPixelColorXY(0, 0, col);
else {
float step = HALF_PI / (2.85f*i);
for (float rad = 0.0f; rad <= HALF_PI+step/2; rad += step) {
// may want to try float version as well (with or without antialiasing)
int x = roundf(sin_t(rad) * i);
int y = roundf(cos_t(rad) * i);
setPixelColorXY(x, y, col);
}
}
else
drawArc(0, 0, i, col);
break;
case M12_pCorner:
for (int x = 0; x <= i; x++) setPixelColorXY(x, i, col);