mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
Merge branch 'filnet/OP-1319_minor_spelling_issue_in_fw_code' into next
This commit is contained in:
commit
8019cad104
@ -76,7 +76,7 @@ extern StabilizationData stabSettings;
|
|||||||
// must be same as eventdispatcher to avoid needing additional mutexes
|
// must be same as eventdispatcher to avoid needing additional mutexes
|
||||||
#define CBTASK_PRIORITY CALLBACK_TASK_FLIGHTCONTROL
|
#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
|
#define OUTERLOOP_SKIPCOUNT 4
|
||||||
|
|
||||||
#endif // STABILIZATION_H
|
#endif // STABILIZATION_H
|
||||||
|
@ -286,10 +286,10 @@ static void stabilizationOuterloopTask()
|
|||||||
|
|
||||||
static void AttitudeStateUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
static void AttitudeStateUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||||
{
|
{
|
||||||
// to reduce CPU utilisation, outer loop is not executed every state update
|
// to reduce CPU utilization, outer loop is not executed on every state update
|
||||||
static uint8_t cpusafer = 0;
|
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!
|
// this does not need mutex protection as both eventdispatcher and stabi run in same callback task!
|
||||||
AttitudeStateGet(&attitude);
|
AttitudeStateGet(&attitude);
|
||||||
PIOS_CALLBACKSCHEDULER_Dispatch(callbackHandle);
|
PIOS_CALLBACKSCHEDULER_Dispatch(callbackHandle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user