1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 15:25:36 +03:00

Merge pull request #11261 from daleckystepan/tasks

Rename task id to task attr
This commit is contained in:
J Blackman 2022-01-11 10:37:53 +11:00 committed by GitHub
commit 51f870f1e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 32 deletions

View file

@ -312,7 +312,7 @@ static void taskCameraControl(uint32_t currentTime)
task_t tasks[TASK_COUNT];
// Task ID data in .data (initialised data)
task_id_t task_ids[TASK_COUNT] = {
task_attr_t task_attrs[TASK_COUNT] = {
[TASK_SYSTEM] = DEFINE_TASK("SYSTEM", "LOAD", NULL, taskSystemLoad, TASK_PERIOD_HZ(10), TASK_PRIORITY_MEDIUM_HIGH),
[TASK_MAIN] = DEFINE_TASK("SYSTEM", "UPDATE", NULL, taskMain, TASK_PERIOD_HZ(1000), TASK_PRIORITY_MEDIUM_HIGH),
[TASK_SERIAL] = DEFINE_TASK("SERIAL", NULL, NULL, taskHandleSerial, TASK_PERIOD_HZ(100), TASK_PRIORITY_LOW), // 100 Hz should be enough to flush up to 115 bytes @ 115200 baud
@ -423,7 +423,7 @@ task_t *getTask(unsigned taskId)
void tasksInit(void)
{
for (int i = 0; i < TASK_COUNT; i++) {
tasks[i].id = &task_ids[i];
tasks[i].attr = &task_attrs[i];
}
schedulerInit();