1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

rearranged accelerometer autodetect code and allow user override by "set acc_hardware" in CLI (0=autodetect,1=adxl345,2=mpu6050,3=mma845x)

added arm/disarm on left/righ roll while throttle down to  configuration options and disabled it by default. "set retarded_arm" in CLI
put gyro_cmpf_factor into settings. default is 310, can be increased to decrease acc influence. debug use only.
dropped acc_lpf_factor back to 4. those who want it at 100, make it so.
cleaned up MPU6050 driver with humanreadable register names
got rid of MMGYRO crap - no use


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@159 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-05-31 17:28:05 +00:00
parent e124390bb1
commit 49653ec65e
11 changed files with 5397 additions and 5312 deletions

View file

@ -53,13 +53,6 @@ typedef enum GimbalFlags {
GIMBAL_DISABLEAUX34 = 1 << 2,
} GimbalFlags;
// Type of accelerometer used
typedef enum AccelSensors {
ADXL345,
MPU6050,
MMA845x
} AccelSensors;
/*********** RC alias *****************/
#define ROLL 0
#define PITCH 1
@ -120,8 +113,10 @@ typedef struct config_t {
int16_t accTrim[2];
// sensor-related stuff
uint8_t acc_hardware; // Which acc hardware to use on boards with more than one device
uint8_t acc_lpf_factor; // Set the Low Pass Filter factor for ACC. Increasing this value would reduce ACC noise (visible in GUI), but would increase ACC lag time. Zero = no filter
uint16_t gyro_lpf; // mpuX050 LPF setting
uint16_t gyro_cmpf_factor; // Set the Gyro Weight for Gyro/Acc complementary filter. Increasing this value would reduce and delay Acc influence on the output of the filter.
uint32_t gyro_smoothing_factor; // How much to smoothen with per axis (32bit value with Roll, Pitch, Yaw in bits 24, 16, 8 respectively
uint16_t activate[CHECKBOXITEMS]; // activate switches
@ -137,6 +132,7 @@ typedef struct config_t {
uint16_t midrc; // Some radios have not a neutral point centered on 1500. can be changed here
uint16_t mincheck; // minimum rc end
uint16_t maxcheck; // maximum rc end
uint8_t retarded_arm; // allow disarsm/arm on throttle down + roll left/right
// Failsafe related configuration
uint8_t failsafe_delay; // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example (10)