mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
merged changes from multiwii_dev 20120504. this means new serial protocol, new buzzer code
fixed spacing in ledring.c defaulted acc_lpf to 100 correction in vtail4 mix (from multiwii_dev) trashed more unused LOG_VALUES crap no binary build since this is untested / non-flight-tested. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@152 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
910df63a7f
commit
0d7460960e
13 changed files with 694 additions and 172 deletions
27
src/mw.h
27
src/mw.h
|
@ -1,9 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
/* This option should be uncommented if ACC Z is accurate enough when motors are running*/
|
||||
/* should now be ok with BMA020 and BMA180 ACC */
|
||||
#define TRUSTED_ACCZ
|
||||
|
||||
/* Failsave settings - added by MIS
|
||||
Failsafe check pulse on THROTTLE channel. If the pulse is OFF (on only THROTTLE or on all channels) the failsafe procedure is initiated.
|
||||
After FAILSAVE_DELAY time of pulse absence, the level mode is on (if ACC or nunchuk is avaliable), PITCH, ROLL and YAW is centered
|
||||
|
@ -43,14 +39,7 @@
|
|||
/* for VBAT monitoring frequency */
|
||||
#define VBATFREQ 6 // to read battery voltage - keep equal to PSENSORFREQ (6) unless you know what you are doing
|
||||
|
||||
// Moving Average Gyros by Magnetron1 (Michele Ardito) ########## beta
|
||||
//#define MMGYRO // Active Moving Average Function for Gyros
|
||||
//#define MMGYROVECTORLENGHT 10 // Lenght of Moving Average Vector
|
||||
// Moving Average ServoGimbal Signal Output
|
||||
//#define MMSERVOGIMBAL // Active Output Moving Average Function for Servos Gimbal
|
||||
//#define MMSERVOGIMBALVECTORLENGHT 32 // Lenght of Moving Average Vector
|
||||
|
||||
#define VERSION 20
|
||||
#define VERSION 200
|
||||
|
||||
// Syncronized with GUI. Only exception is mixer > 11, which is always returned as 11 during serialization.
|
||||
typedef enum MultiType
|
||||
|
@ -128,6 +117,9 @@ typedef struct config_t {
|
|||
|
||||
uint8_t rcRate8;
|
||||
uint8_t rcExpo8;
|
||||
uint8_t thrMid8;
|
||||
uint8_t thrExpo8;
|
||||
|
||||
uint8_t rollPitchRate;
|
||||
uint8_t yawRate;
|
||||
|
||||
|
@ -141,8 +133,7 @@ typedef struct config_t {
|
|||
uint16_t gyro_lpf; // mpuX050 LPF setting
|
||||
uint32_t gyro_smoothing_factor; // How much to smoothen with per axis (32bit value with Roll, Pitch, Yaw in bits 24, 16, 8 respectively
|
||||
|
||||
uint8_t activate1[CHECKBOXITEMS];
|
||||
uint8_t activate2[CHECKBOXITEMS];
|
||||
uint16_t activate[CHECKBOXITEMS]; // activate switches
|
||||
uint8_t vbatscale; // adjust this to match battery voltage to reported value
|
||||
uint8_t vbatmaxcellvoltage; // maximum voltage per cell, used for auto-detecting battery voltage in 0.1V units, default is 43 (4.3V)
|
||||
uint8_t vbatmincellvoltage; // minimum voltage per cell, this triggers battery out alarms, in 0.1V units, default is 33 (3.3V)
|
||||
|
@ -211,6 +202,7 @@ extern int16_t heading;
|
|||
extern int16_t annex650_overrun_count;
|
||||
extern int32_t pressure;
|
||||
extern int32_t BaroAlt;
|
||||
extern int16_t sonarAlt;
|
||||
extern int32_t EstAlt;
|
||||
extern int32_t AltHold;
|
||||
extern int16_t errorAltitudeI;
|
||||
|
@ -240,7 +232,9 @@ extern uint8_t GPSModeHold;
|
|||
extern uint16_t GPS_altitude;
|
||||
extern uint16_t GPS_speed; // altitude in 0.1m and speed in 0.1m/s - Added by Mis
|
||||
extern uint8_t vbat;
|
||||
extern int16_t lookupRX[7]; // lookup table for expo & RC rate
|
||||
extern int16_t lookupPitchRollRC[6]; // lookup table for expo & RC rate PITCH+ROLL
|
||||
extern int16_t lookupThrottleRC[11]; // lookup table for expo & mid THROTTLE
|
||||
extern uint8_t toggleBeep;
|
||||
|
||||
extern config_t cfg;
|
||||
extern sensor_t acc;
|
||||
|
@ -280,7 +274,7 @@ void serialCom(void);
|
|||
// Config
|
||||
void parseRcChannels(const char *input);
|
||||
void readEEPROM(void);
|
||||
void writeParams(void);
|
||||
void writeParams(uint8_t b);
|
||||
void checkFirstTime(bool reset);
|
||||
bool sensors(uint32_t mask);
|
||||
void sensorsSet(uint32_t mask);
|
||||
|
@ -301,3 +295,4 @@ void cliProcess(void);
|
|||
|
||||
// gps
|
||||
void gpsInit(uint32_t baudrate);
|
||||
void GPS_reset_home_position(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue