Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2098 → Rev 2099

/branches/dongfang_FC_fixedwing/flight.h
11,31 → 11,18
 
#define PITCH 0
#define ROLL 1
#define YAW 2
 
/*
* The output BLC throttles can be set in an [0..256[ interval. Some staticParams limits
* (min, throttle, max throttle etc) are in a [0..256[ interval.
* The calculation of motor throttle values from sensor and control information (basically
* flight.c) take place in an [0..1024[ interval for better precision.
* This is the conversion factor.
* --> Replaced back again by CONTROL_SCALING. Even though the 2 things are not quite the
* same, they are unseperable anyway.
*/
#define MAX_SERVOS 8
 
// looping params
// extern long TurnOver180Nick, TurnOver180Roll;
extern int16_t servos[MAX_SERVOS];
 
// external control
// extern int16_t ExternStickNick, ExternStickRoll, ExternStickYaw;
// extern int16_t naviAccPitch, naviAccRoll, naviCntAcc;
typedef enum {
FLIGHT_MODE_MANUAL,
FLIGHT_MODE_RATE,
FLIGHT_MODE_ANGLES
} FlightMode_t;
 
// TODO: Rip em up, replace by a flight-state machine.
// OK first step: Move to control mixer, where the state machine will be located anyway.
// extern volatile uint8_t MKFlags;
// extern uint16_t isFlying;
 
#define HH_RANGE ((int32_t)GYRO_DEG_FACTOR_PITCHROLL * 30)
 
void flight_control(void);
void transmitMotorThrottleData(void);
void flight_setNeutral(void);