Fix speedFactor midpoint

This commit is contained in:
Will Tatam
2023-06-29 21:13:27 +01:00
parent 0bd7acadf3
commit 918ed57f1b

View File

@@ -67,7 +67,13 @@ class ANIMartRIXMod:public ANIMartRIX {
if (SEGENV.call == 0) {
init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false);
}
float speedFactor = map(SEGMENT.speed, 0, 255, 1, 100) / 10;
float speedFactor = 1.0;
if (SEGMENT.speed < 128) {
speedFactor = map(SEGMENT.speed, 0, 127, 1, 10) / 10;
}
else{
speedFactor = map(SEGMENT.speed, 128, 255, 10, 100) / 10;
}
setSpeedFactor(speedFactor);
}
void setPixelColor(int x, int y, rgb pixel) {