mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +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
|
@ -5,7 +5,7 @@ uint8_t calibratedACC = 0;
|
|||
uint16_t calibratingA = 0; // the calibration is done is the main loop. Calibrating decreases at each cycle down to 0, then we enter in a normal mode.
|
||||
uint16_t calibratingG = 0;
|
||||
uint8_t calibratingM = 0;
|
||||
uint16_t acc_1G = 256; // this is the 1G measured acceleration
|
||||
uint16_t acc_1G = 256; // this is the 1G measured acceleration.
|
||||
int16_t heading, magHold;
|
||||
|
||||
extern uint16_t InflightcalibratingA;
|
||||
|
@ -116,7 +116,7 @@ static void ACC_Common(void)
|
|||
cfg.accZero[YAW] = a[YAW] / 400 - acc_1G; // for nunchuk 200=1G
|
||||
cfg.accTrim[ROLL] = 0;
|
||||
cfg.accTrim[PITCH] = 0;
|
||||
writeParams(); // write accZero in EEPROM
|
||||
writeParams(1); // write accZero in EEPROM
|
||||
}
|
||||
calibratingA--;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ static void ACC_Common(void)
|
|||
if (InflightcalibratingA == 1) {
|
||||
AccInflightCalibrationActive = 0;
|
||||
AccInflightCalibrationMeasurementDone = 1;
|
||||
blinkLED(10, 10, 2); //buzzer for indicatiing the start inflight
|
||||
toggleBeep = 2; //buzzer for indicatiing the end of calibration
|
||||
// recover saved values to maintain current flight behavior until new values are transferred
|
||||
cfg.accZero[ROLL] = accZero_saved[ROLL];
|
||||
cfg.accZero[PITCH] = accZero_saved[PITCH];
|
||||
|
@ -167,7 +167,7 @@ static void ACC_Common(void)
|
|||
cfg.accZero[YAW] = b[YAW] / 50 - acc_1G; // for nunchuk 200=1G
|
||||
cfg.accTrim[ROLL] = 0;
|
||||
cfg.accTrim[PITCH] = 0;
|
||||
writeParams(); // write accZero in EEPROM
|
||||
writeParams(1); // write accZero in EEPROM
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ void Mag_getADC(void)
|
|||
tCal = 0;
|
||||
for (axis = 0; axis < 3; axis++)
|
||||
cfg.magZero[axis] = (magZeroTempMin[axis] + magZeroTempMax[axis]) / 2;
|
||||
writeParams();
|
||||
writeParams(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue