From 575e89f1a120deddf5f1fbe48d0d693e677fe7e6 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 30 Aug 2014 18:09:23 +0200 Subject: [PATCH] OP-1319 fixed minor spelling mistake in firmware code --- flight/modules/Stabilization/inc/stabilization.h | 2 +- flight/modules/Stabilization/outerloop.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flight/modules/Stabilization/inc/stabilization.h b/flight/modules/Stabilization/inc/stabilization.h index 8314ae97e..44ab8917c 100644 --- a/flight/modules/Stabilization/inc/stabilization.h +++ b/flight/modules/Stabilization/inc/stabilization.h @@ -76,7 +76,7 @@ extern StabilizationData stabSettings; // must be same as eventdispatcher to avoid needing additional mutexes #define CBTASK_PRIORITY CALLBACK_TASK_FLIGHTCONTROL -// outer loop only executes every 4th uavobject update to safe CPU +// outer loop only executes every 4th uavobject update to save CPU #define OUTERLOOP_SKIPCOUNT 4 #endif // STABILIZATION_H diff --git a/flight/modules/Stabilization/outerloop.c b/flight/modules/Stabilization/outerloop.c index 7d865b556..7fc5aa4f5 100644 --- a/flight/modules/Stabilization/outerloop.c +++ b/flight/modules/Stabilization/outerloop.c @@ -286,10 +286,10 @@ static void stabilizationOuterloopTask() static void AttitudeStateUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) { - // to reduce CPU utilisation, outer loop is not executed every state update - static uint8_t cpusafer = 0; + // to reduce CPU utilization, outer loop is not executed on every state update + static uint8_t cpusaver = 0; - if ((cpusafer++ % OUTERLOOP_SKIPCOUNT) == 0) { + if ((cpusaver++ % OUTERLOOP_SKIPCOUNT) == 0) { // this does not need mutex protection as both eventdispatcher and stabi run in same callback task! AttitudeStateGet(&attitude); PIOS_CALLBACKSCHEDULER_Dispatch(callbackHandle);