1
0
forked from me/IronOS

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:
Ben V. Brown
2021-03-15 21:01:09 +11:00
committed by GitHub
parent 2796f095af
commit 7fbfde7b33
12 changed files with 35 additions and 28 deletions

View File

@@ -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) {