NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
flight_altitudehold_unittest.cc File Reference
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
#include <platform.h>
#include "build_config.h"
#include "debug.h"
#include "common/axis.h"
#include "common/maths.h"
#include "drivers/sensor.h"
#include "drivers/accgyro.h"
#include "sensors/acceleration.h"
#include "sensors/barometer.h"
#include "rx/rx.h"
#include "flight/mixer.h"
#include "flight/anglerate.h"
#include "flight/altitudehold.h"
#include "config/config.h"
#include "config/rc_controls.h"
#include "config/altitudehold.h"
#include "config/mixer.h"
#include "unittest_macros.h"
#include "gtest/gtest.h"
Include dependency graph for flight_altitudehold_unittest.cc:

Data Structures

struct  inclinationExpectation_s
 

Macros

#define BARO
 
#define DOWNWARDS_THRUST   true
 
#define UPWARDS_THRUST   false
 

Typedefs

typedef struct
inclinationExpectation_s 
inclinationExpectation_t
 

Functions

bool isThrustFacingDownwards (union attitude_euler_angles *attitude)
 
uint16_t calculateTiltAngle (union attitude_euler_angles *attitude)
 
bool rcModeIsActive (boxId_e modeId)
 
int16_t rc_get_channel_value (uint8_t id)
 
void rc_set_channel_value (uint8_t id, int16_t value)
 
float imu_get_velocity_integration_time (struct imu *self)
 
float imu_get_est_vertical_vel_cms (struct imu *self)
 
void imu_reset_velocity_estimate (struct imu *self)
 
float imu_get_avg_vertical_accel_cmss (struct imu *self)
 
int16_t imu_get_roll_dd (struct imu *self)
 
int16_t imu_get_pitch_dd (struct imu *self)
 
void gyroUpdate (void)
 
bool sensors (uint32_t mask)
 
void updateAccelerationReadings (rollAndPitchTrims_t *rollAndPitchTrims)
 
void imuResetAccelerationSum (void)
 
uint32_t micros (void)
 
bool isBaroCalibrationComplete (void)
 
void performBaroCalibrationCycle (void)
 
int32_t baroCalculateAltitude (void)
 

Variables

struct imu default_imu
 
uint32_t rcModeActivationMask
 
int16_t rcCommand [4]
 
int16_t rcData [RX_MAX_SUPPORTED_RC_CHANNELS]
 
uint32_t accTimeSum
 
int accSumCount
 
float accVelScale
 
int32_t BaroAlt
 
int16_t debug [DEBUG16_VALUE_COUNT]
 
uint8_t stateFlags
 
uint16_t flightModeFlags
 
uint8_t armingFlags
 
int32_t sonarAlt
 
int16_t sonarCfAltCm
 
int16_t sonarMaxAltWithTiltCm
 

Macro Definition Documentation

#define BARO
#define DOWNWARDS_THRUST   true
#define UPWARDS_THRUST   false

Typedef Documentation

Function Documentation

int32_t baroCalculateAltitude ( void  )
uint16_t calculateTiltAngle ( union attitude_euler_angles attitude)
void gyroUpdate ( void  )
void imuResetAccelerationSum ( void  )
bool isBaroCalibrationComplete ( void  )
bool isThrustFacingDownwards ( union attitude_euler_angles attitude)
uint32_t micros ( void  )
void performBaroCalibrationCycle ( void  )
int16_t rc_get_channel_value ( uint8_t  id)
void rc_set_channel_value ( uint8_t  id,
int16_t  value 
)
bool rcModeIsActive ( boxId_e  modeId)
bool sensors ( uint32_t  mask)
void updateAccelerationReadings ( rollAndPitchTrims_t *  rollAndPitchTrims)

Variable Documentation

int accSumCount
uint32_t accTimeSum
float accVelScale
uint8_t armingFlags
int32_t BaroAlt
int16_t debug[DEBUG16_VALUE_COUNT]
struct imu default_imu
uint16_t flightModeFlags
int16_t rcCommand[4]
uint32_t rcModeActivationMask
int32_t sonarAlt
int16_t sonarCfAltCm
int16_t sonarMaxAltWithTiltCm
uint8_t stateFlags