NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
system_calls_imu Struct Reference

#include <system_calls.h>

Data Fields

int(* read_gyro )(const struct system_calls_imu *self, int16_t out[3])
 
int(* read_acc )(const struct system_calls_imu *self, int16_t out[3])
 
int(* read_pressure )(const struct system_calls_imu *self, uint16_t *out)
 
int(* read_temperature )(const struct system_calls_imu *self, uint16_t *out)
 

Detailed Description

System calls responsible for reading sensor information.

Field Documentation

int(* system_calls_imu::read_acc)(const struct system_calls_imu *self, int16_t out[3])

Reads acceleration currently excerting force on the object (in stationary position it should be -g: ie in the opposite direction from gravity). Units are such that SYSTEM_ACC_1G corresponds to 1G.

Parameters
outarray of three components where gyro data will be written.
Returns
negative errno number on error, 0 on success
int(* system_calls_imu::read_gyro)(const struct system_calls_imu *self, int16_t out[3])

Reads gyro rotational rate as a 16 bit integer. Full range (+-2^15) is expected to equal SYSTEM_GYRO_PRECISION degrees per second.

Parameters
outarray of three components where gyro data will be written.
Returns
negative errno number on error, 0 on success
int(* system_calls_imu::read_pressure)(const struct system_calls_imu *self, uint16_t *out)
int(* system_calls_imu::read_temperature)(const struct system_calls_imu *self, uint16_t *out)

The documentation for this struct was generated from the following file: