NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ninja.h File Reference
#include <stdio.h>
#include "sensors/instruments.h"
#include "flight/mixer.h"
#include "sensors/battery.h"
#include "system_calls.h"
#include "flight/anglerate.h"
#include "ninja_sched.h"
#include "blackbox/blackbox.h"
#include "io/rc_adjustments.h"
#include "flight/failsafe.h"
#include "io/ledstrip.h"
#include "io/beeper.h"
#include "io/serial_msp.h"
#include "msp.h"
#include "cli.h"
#include "sensors/gps.h"
#include "rx/rc.h"
#include "common/pt.h"
Include dependency graph for ninja.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ninja_rc_input
 
struct  ninja
 

Enumerations

enum  sensor_mask_t {
  NINJA_SENSOR_GYRO = (1 << 0), NINJA_SENSOR_ACC = (1 << 1), NINJA_SENSOR_MAG = (1 << 2), NINJA_SENSOR_GPS = (1 << 3),
  NINJA_SENSOR_BARO = (1 << 4), NINJA_SENSOR_SONAR = (1 << 5)
}
 

Functions

void ninja_init (struct ninja *self, const struct system_calls *syscalls, struct config *config)
 
void ninja_arm (struct ninja *self)
 
void ninja_disarm (struct ninja *self)
 
uint32_t ninja_has_sensors (struct ninja *self, sensor_mask_t sensor_mask)
 
bool ninja_is_armed (struct ninja *self)
 
void ninja_heartbeat (struct ninja *self)
 
void ninja_input_rc (struct ninja *self, const struct ninja_rc_input *rc)
 
void ninja_input_gyro (struct ninja *self, int32_t x, int32_t y, int32_t z)
 
void ninja_input_acc (struct ninja *self, int32_t x, int32_t y, int32_t z)
 
void ninja_run_pid_loop (struct ninja *self, uint32_t dt_us)
 

Enumeration Type Documentation

Enumerator
NINJA_SENSOR_GYRO 
NINJA_SENSOR_ACC 
NINJA_SENSOR_MAG 
NINJA_SENSOR_GPS 
NINJA_SENSOR_BARO 
NINJA_SENSOR_SONAR 

Function Documentation

void ninja_arm ( struct ninja self)

Here is the call graph for this function:

void ninja_disarm ( struct ninja self)

Here is the call graph for this function:

uint32_t ninja_has_sensors ( struct ninja self,
sensor_mask_t  sensor_mask 
)
void ninja_heartbeat ( struct ninja self)

Here is the call graph for this function:

void ninja_init ( struct ninja self,
const struct system_calls syscalls,
struct config config 
)

Here is the call graph for this function:

void ninja_input_acc ( struct ninja self,
int32_t  x,
int32_t  y,
int32_t  z 
)
void ninja_input_gyro ( struct ninja self,
int32_t  x,
int32_t  y,
int32_t  z 
)
void ninja_input_rc ( struct ninja self,
const struct ninja_rc_input rc 
)
bool ninja_is_armed ( struct ninja self)
void ninja_run_pid_loop ( struct ninja self,
uint32_t  dt_us 
)

Here is the call graph for this function: