Correct a few missed time values from the tick rate change (#874)
* Pass over all refs to xTaskGetTickCount()
* That wasn't a second 😓
* Update FreeRTOSConfig.h
* Fix warning in usb code; style; fix slow description
This commit is contained in:
@@ -162,14 +162,14 @@ void OLED::transitionSecondaryFramebuffer(bool forwardNavigation) {
|
||||
uint8_t *firstBackStripPtr = &secondFrameBuffer[0];
|
||||
uint8_t *secondBackStripPtr = &secondFrameBuffer[OLED_WIDTH];
|
||||
|
||||
uint32_t totalDuration = 50; // 500ms
|
||||
uint32_t totalDuration = TICKS_100MS * 5; // 500ms
|
||||
uint32_t duration = 0;
|
||||
uint32_t start = xTaskGetTickCount();
|
||||
uint8_t offset = 0;
|
||||
|
||||
while (duration <= totalDuration) {
|
||||
duration = xTaskGetTickCount() - start;
|
||||
uint8_t progress = duration * TICKS_SECOND / totalDuration;
|
||||
uint8_t progress = ((duration * 100) / totalDuration); // Percentage of the period we are through for animation
|
||||
progress = easeInOutTiming(progress);
|
||||
progress = lerp(0, OLED_WIDTH, progress);
|
||||
if (progress > OLED_WIDTH) {
|
||||
|
||||
Reference in New Issue
Block a user