0,0 → 1,74 |
#ifndef _FLIGHTCONTROL_H |
#define _FLIGHTCONTROL_H |
|
#define EC_VALID 0x01 //only valid if this is 1 |
#define EC_GAS_ADD 0x02 //if 1 -> use the GAS Value not as MAX |
#define EC_IGNORE_RC 0x80 //if 1 -> for Flying without RC-Control |
|
#define STARTING_ALTITUDE 1000 |
#define MAX_ALTITUDE 3000 |
#define MAX_CLIMBING_SPEED 50 |
#define STARTING_THRUST 10 |
|
extern void perform_flight_correction(); |
extern void reset_reference_values(); |
extern void flightcontrol_init(); |
extern void transmit_flight_data(); |
extern void flightcontrol_timekeeper(); |
|
struct str_3d_data |
{ |
int16 AngleNick; |
int16 AngleRoll; |
int16 Heading; |
u8 StickNick; |
u8 StickRoll; |
u8 StickYaw; |
u8 StickGas; |
int16 Altimeter; |
int16 AccZ; |
}; |
struct str_3d_data flight_data; |
|
struct str_configuration |
{ |
u8 channel_gas; |
u8 channel_gier; |
u8 channel_nick; |
u8 channel_roll; |
u8 channel_heightControl; |
u8 channel_autostart; |
u8 channel_gps; |
u8 channel_carefree; |
u8 dynamicPositionHold; |
}; |
struct str_configuration config_data; |
|
struct str_flightcontrol_values |
{ |
u8 value_gas; |
u8 value_gier; |
u8 value_nick; |
u8 value_roll; |
u8 value_heightControl; |
u8 value_autostart; |
u8 value_gps; |
u8 value_carefree; |
u8 value_dynamicPositionHold; |
}; |
struct str_flightcontrol_values fc_values; |
|
struct str_fc_correction_data |
{ |
signed char Nick; |
signed char Roll; |
signed char Gier; |
signed char Gas; |
unsigned char Frame; |
unsigned char Config; |
unsigned char free; |
}; |
|
struct str_fc_correction_data fc_correction_data; |
|
#endif //_FLIGHTCONTROL_H |