mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Selectable BARO (set baro_hardware)
Disabling baro will boost performance on FULL boards
This commit is contained in:
parent
f2c6822c81
commit
5390cdc804
7 changed files with 14 additions and 9 deletions
|
@ -410,12 +410,12 @@ retry:
|
|||
sensorsSet(SENSOR_ACC);
|
||||
}
|
||||
|
||||
static void detectBaro()
|
||||
static void detectBaro(baroSensor_e baroHardwareToUse)
|
||||
{
|
||||
#ifdef BARO
|
||||
// Detect what pressure sensors are available. baro->update() is set to sensor-specific update function
|
||||
|
||||
baroSensor_e baroHardware = BARO_DEFAULT;
|
||||
baroSensor_e baroHardware = baroHardwareToUse;
|
||||
|
||||
#ifdef USE_BARO_BMP085
|
||||
|
||||
|
@ -597,7 +597,7 @@ void reconfigureAlignment(sensorAlignmentConfig_t *sensorAlignmentConfig)
|
|||
}
|
||||
}
|
||||
|
||||
bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t gyroLpf, uint8_t accHardwareToUse, uint8_t magHardwareToUse, int16_t magDeclinationFromConfig, uint32_t looptime, uint8_t syncGyroToLoop)
|
||||
bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t gyroLpf, uint8_t accHardwareToUse, uint8_t magHardwareToUse, uint8_t baroHardwareToUse, int16_t magDeclinationFromConfig, uint32_t looptime, uint8_t syncGyroToLoop)
|
||||
{
|
||||
int16_t deg, min;
|
||||
|
||||
|
@ -608,7 +608,7 @@ bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t
|
|||
return false;
|
||||
}
|
||||
detectAcc(accHardwareToUse);
|
||||
detectBaro();
|
||||
detectBaro(baroHardwareToUse);
|
||||
|
||||
|
||||
// Now time to init things, acc first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue