Skip to content

Commit

Permalink
Merge pull request #1 from MichMich/patch-1
Browse files Browse the repository at this point in the history
Ensure rpmFilter is resized before the updateTask is created.
  • Loading branch information
noranraskin authored Sep 26, 2024
2 parents 21d6f8b + 59be204 commit 6c4e3ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MT6701.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ void MT6701::begin()
{
Wire.begin();
Wire.setClock(400000);
xTaskCreatePinnedToCore(updateTask, "MT6701 update task", 2048, this, 2, NULL, 1);
xSemaphoreTake(rpmFilterMutex, portMAX_DELAY);
rpmFilter.resize(rpmFilterSize);
xSemaphoreGive(rpmFilterMutex);
xTaskCreatePinnedToCore(updateTask, "MT6701 update task", 2048, this, 2, NULL, 1);
}

/**
Expand Down Expand Up @@ -199,4 +199,4 @@ void MT6701::updateTask(void *pvParameters)
// vTaskDelay(delay);
// }
}
}
}

0 comments on commit 6c4e3ad

Please sign in to comment.