From 17e8268e811efcabb71ba822f6d63027ae5afcea Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Thu, 18 Apr 2013 18:35:57 +0200 Subject: [PATCH] typo fix in callback scheduler --- flight/targets/UAVObjects/callbackscheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/targets/UAVObjects/callbackscheduler.c b/flight/targets/UAVObjects/callbackscheduler.c index a309f0c0e..f6ee7bc5d 100644 --- a/flight/targets/UAVObjects/callbackscheduler.c +++ b/flight/targets/UAVObjects/callbackscheduler.c @@ -342,7 +342,7 @@ static int32_t runNextCallback(struct DelayedCallbackTaskStruct *task, DelayedCa next = current->next; xSemaphoreTakeRecursive(mutex, portMAX_DELAY); // access to scheduletime should be mutex protected if (current->scheduletime) { - diff = next->scheduletime - xTaskGetTickCount(); + diff = current->scheduletime - xTaskGetTickCount(); if (diff<=0) { current->waiting = true; } else if (diff