mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Configurable Baro Type
We can disable/configure mag, acc, but why not baro? ident
This commit is contained in:
parent
6a24295525
commit
26f89b74bd
7 changed files with 12 additions and 8 deletions
|
@ -408,12 +408,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
|
||||
|
||||
|
@ -587,7 +587,7 @@ void reconfigureAlignment(sensorAlignmentConfig_t *sensorAlignmentConfig)
|
|||
}
|
||||
}
|
||||
|
||||
bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t gyroLpf, uint8_t accHardwareToUse, uint8_t magHardwareToUse, int16_t magDeclinationFromConfig)
|
||||
bool sensorsAutodetect(sensorAlignmentConfig_t *sensorAlignmentConfig, uint16_t gyroLpf, uint8_t accHardwareToUse, uint8_t magHardwareToUse, uint8_t baroHardwareToUse, int16_t magDeclinationFromConfig)
|
||||
{
|
||||
int16_t deg, min;
|
||||
|
||||
|
@ -598,7 +598,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