NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ninja_sched.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "platform.h"
#include "debug.h"
#include "build_config.h"
#include "common/maths.h"
#include "common/utils.h"
#include "drivers/system.h"
#include "config/feature.h"
#include "io/serial.h"
#include "io/beeper.h"
#include "io/statusindicator.h"
#include "io/transponder_ir.h"
#include "io/display.h"
#include "io/ledstrip.h"
#include "io/serial_msp.h"
#include "flight/altitudehold.h"
#include "sensors/barometer.h"
#include "sensors/battery.h"
#include "sensors/imu.h"
#include "telemetry/telemetry.h"
#include "ninja.h"
#include "ninja_sched.h"
#include "rx/rc.h"
Include dependency graph for ninja_sched.c:

Macros

#define REALTIME_GUARD_INTERVAL_MIN   10
 
#define REALTIME_GUARD_INTERVAL_MAX   300
 
#define REALTIME_GUARD_INTERVAL_MARGIN   25
 
#define VBATINTERVAL   (6 * 3500)
 
#define IBATINTERVAL   (6 * 3500)
 

Functions

void led_on (int id)
 
void led_off (int id)
 
void ninja_sched_get_task_info (struct ninja_sched *self, cfTaskId_e taskId, cfTaskInfo_t *taskInfo)
 
void ninja_sched_set_task_period (struct ninja_sched *self, cfTaskId_e taskId, uint32_t newPeriodMicros)
 
void ninja_sched_set_task_enabled (struct ninja_sched *self, cfTaskId_e taskId, bool enabled)
 
uint32_t ninja_sched_get_task_dt (struct ninja_sched *self, cfTaskId_e taskId)
 
void ninja_sched_init (struct ninja_sched *self, const struct system_calls_time *time, const struct config *config)
 
void ninja_sched_run (struct ninja_sched *self)
 
uint16_t ninja_sched_get_load (struct ninja_sched *self)
 

Detailed Description

Author
Cleanflight
Martin Schröder 2016