Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1910 → Rev 2099

/branches/dongfang_FC_fixedwing/controlMixer.h
23,7 → 23,7
#define SIGNAL_GOOD 4
 
/*
* The EATR arrays
* The PRTY arrays
*/
#define CONTROL_ELEVATOR 0
#define CONTROL_AILERONS 1
31,6 → 31,18
#define CONTROL_RUDDER 3
 
/*
* Looping flags.
* LOOPING_UP || LOOPING_DOWN <=> LOOPING_PITCH_AXIS
* LOOPING_LEFT || LOOPING_RIGHT <=> LOOPING_ROLL_AXIS
*/
#define LOOPING_UP (1<<0)
#define LOOPING_DOWN (1<<1)
#define LOOPING_LEFT (1<<2)
#define LOOPING_RIGHT (1<<3)
#define LOOPING_PITCH_AXIS (1<<4)
#define LOOPING_ROLL_AXIS (1<<5)
 
/*
* This is only relevant for "abstract controls" ie. all control sources have the
* same interface. This struct of code pointers is used like an abstract class
* definition from object-oriented languages, and all control input implementations
59,16 → 71,12
/*
* Our output.
*/
extern int16_t control[4];
extern int32_t controlIntegrals[4];
extern int16_t controls[4];
extern uint16_t controlActivity;
extern uint16_t maxControl[2];
//extern uint16_t maxControl[2];
 
extern volatile uint8_t MKFlags;
extern uint16_t isFlying;
 
void controlMixer_initVariables(void);
void controlMixer_updateVariables(void);
//void controlMixer_updateVariables(void);
 
void controlMixer_setNeutral(void);
 
75,7 → 83,7
/*
* Update the exported variables. Called at every flight control cycle.
*/
void controlMixer_update(void);
void controlMixer_periodicTask(void);
 
/*
* Get the current command. See the COMMAND_.... define's
85,6 → 93,7
void controlMixer_performCalibrationCommands(uint8_t command);
 
uint8_t controlMixer_getSignalQuality(void);
extern uint8_t controlMixer_didReceiveSignal;
 
/*
* The controls operate in [-1024, 1024] just about.
111,8 → 120,5
*
* Not in any of these positions: 0
*/
// void controlMixer_handleCommands(void);
uint8_t controlMixer_getArgument(void);
uint8_t controlMixer_isCommandRepeated(void);
// TODO: Abstract away if possible.
uint8_t controlMixer_testCompassCalState(void);