setSpeedFactor in animartrix

This commit is contained in:
Will Tatam
2023-06-29 12:04:38 +01:00
parent 17147f3b50
commit 3eed40331f
2 changed files with 3 additions and 1 deletions

View File

@@ -67,6 +67,8 @@ class ANIMartRIXMod:public ANIMartRIX {
if (SEGENV.call == 0) {
init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false);
}
float speedFactor = map(source, 0, 255, 1, 100) / 10;
setSpeedFactor(speedFactor);
}
void setPixelColor(int x, int y, rgb pixel) {
SEGMENT.setPixelColorXY(x, y, CRGB(pixel.red, pixel.green, pixel.blue));