1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

fixed acczero offsets to 0 on initial eeprom cleanup

added fifo mode to adxl345 driver, currently disabled. work in progress.
fixed output for PWM 5-8 when used with PPM + camstab + abovequad configs.
fixed baro, now alt-hold actually works. silly copypaste typo.
trashed all remaining parts of power meter and lcd configuration stuff. useless.


git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@145 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-04-07 15:29:00 +00:00
parent 9e5504acd8
commit cb334ecf47
13 changed files with 2849 additions and 3020 deletions

View file

@ -33,10 +33,6 @@ void readEEPROM(void)
// Read flash
memcpy(&cfg, (char *)FLASH_WRITE_ADDR, sizeof(config_t));
#if defined(POWERMETER)
pAlarm = (uint32_t) cfg.powerTrigger1 *(uint32_t) PLEVELSCALE *(uint32_t) PLEVELDIV; // need to cast before multiplying
#endif
for (i = 0; i < 7; i++)
lookupRX[i] = (2500 + cfg.rcExpo8 * (i * i - 25)) * i * (int32_t) cfg.rcRate8 / 1250;
@ -116,10 +112,12 @@ void checkFirstTime(bool reset)
}
cfg.accTrim[0] = 0;
cfg.accTrim[1] = 0;
cfg.accZero[0] = 0;
cfg.accZero[1] = 0;
cfg.accZero[2] = 0;
cfg.acc_lpf_factor = 4;
cfg.gyro_lpf = 42;
cfg.gyro_smoothing_factor = 0x00141403; // default factors of 20, 20, 3 for R/P/Y
cfg.powerTrigger1 = 0;
cfg.vbatscale = 110;
cfg.vbatmaxcellvoltage = 43;
cfg.vbatmincellvoltage = 33;