more accurate FPS forESP32
the standard millis() code is very inaccurate in the "high FPS" ranges. This replaces it with the esp32 high resolution timer.
This commit is contained in:
@@ -2809,7 +2809,7 @@ uint16_t mode_bouncing_balls(void) {
|
||||
// number of balls based on intensity setting to max of 7 (cycles colors)
|
||||
// non-chosen color is a random color
|
||||
uint16_t numBalls = (SEGMENT.intensity * (maxNumBalls - 1)) / 255 + 1; // minimum 1 ball
|
||||
const float gravity = -9.81; // standard value of gravity
|
||||
constexpr float gravity = -9.81; // standard value of gravity
|
||||
const bool hasCol2 = SEGCOLOR(2);
|
||||
const unsigned long time = millis();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user