dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
transmitter_control.h File Reference

Process transmitter inputs and use as control source. More...

#include "stdint.h"
#include "flightstatus.h"
#include "manualcontrolcommand.h"
#include "manualcontrolsettings.h"
#include "stabilizationdesired.h"
#include "stabilizationsettings.h"

Go to the source code of this file.

Macros

#define assumptions1
 
#define assumptions3
 
#define assumptions5
 
#define assumptions_flightmode
 
#define assumptions_channelcount
 
#define NEQ(a, b)   (((int) (a)) != ((int) (b)))
 

Functions

 DONT_BUILD_IF (!(assumptions1), TransmitterControlAssumptions1)
 
 DONT_BUILD_IF (!(assumptions3), TransmitterControlAssumptions3)
 
 DONT_BUILD_IF (!(assumptions5), TransmitterControlAssumptions5)
 
 DONT_BUILD_IF (!(assumptions_flightmode), TransmitterControlAssumptions_fm)
 
 DONT_BUILD_IF (!(assumptions_channelcount), TransmitterControlAssumptions_cc)
 
 DONT_BUILD_IF (NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, MANUALCONTROLSETTINGS_STABILIZATION1SETTINGS_ROLL)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, STABILIZATIONSETTINGS_MANUALRATE_ROLL)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, STABILIZATIONSETTINGS_RATEEXPO_ROLL)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, STABILIZATIONSETTINGS_HORIZONEXPO_ROLL)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, STABILIZATIONSETTINGS_DEADBANDWIDTH_ROLL)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_ROLL, STABILIZATIONSETTINGS_DEADBANDSLOPE_ROLL), ROLLIndicesMismatch)
 
 DONT_BUILD_IF (NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, MANUALCONTROLSETTINGS_STABILIZATION1SETTINGS_PITCH)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, STABILIZATIONSETTINGS_MANUALRATE_PITCH)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, STABILIZATIONSETTINGS_RATEEXPO_PITCH)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, STABILIZATIONSETTINGS_HORIZONEXPO_PITCH)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, STABILIZATIONSETTINGS_DEADBANDWIDTH_PITCH)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_PITCH, STABILIZATIONSETTINGS_DEADBANDSLOPE_PITCH), PITCHIndicesMismatch)
 
 DONT_BUILD_IF (NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, MANUALCONTROLSETTINGS_STABILIZATION1SETTINGS_YAW)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, STABILIZATIONSETTINGS_MANUALRATE_YAW)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, STABILIZATIONSETTINGS_RATEEXPO_YAW)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, STABILIZATIONSETTINGS_HORIZONEXPO_YAW)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, STABILIZATIONSETTINGS_DEADBANDWIDTH_YAW)||NEQ(STABILIZATIONDESIRED_STABILIZATIONMODE_YAW, STABILIZATIONSETTINGS_DEADBANDSLOPE_YAW), YAWIndicesMismatch)
 
int32_t transmitter_control_initialize ()
 Initialize the transmitter control mode. More...
 
int32_t transmitter_control_update ()
 Process inputs and arming. More...
 
int32_t transmitter_control_select (bool reset_controller)
 Select and use transmitter control. More...
 
uint8_t transmitter_control_get_flight_mode ()
 Query what the flight mode would be if this is selected. More...
 
enum control_status transmitter_control_get_status ()
 Get any control events. More...
 

Detailed Description

Process transmitter inputs and use as control source.

Author
dRonin, http://dRonin.org/, Copyright (C) 2015-2016
Tau Labs, http://taulabs.org, Copyright (C) 2013-2015
See Also
The GNU Public License (GPL) Version 3

Definition in file transmitter_control.h.