mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Moved configuration validation into 'config.c'.
This commit is contained in:
parent
b137bbe80c
commit
99f77fa88d
41 changed files with 92 additions and 76 deletions
|
@ -144,14 +144,12 @@
|
|||
#include "pg/pin_pull_up_down.h"
|
||||
#include "pg/pg.h"
|
||||
#include "pg/rx.h"
|
||||
#include "pg/rx_spi.h"
|
||||
#include "pg/rx_pwm.h"
|
||||
#include "pg/sdcard.h"
|
||||
#include "pg/vcd.h"
|
||||
#include "pg/vtx_io.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
#include "rx/rx_spi.h"
|
||||
#include "rx/spektrum.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
@ -646,14 +644,6 @@ void init(void)
|
|||
#endif
|
||||
|
||||
#ifdef USE_ADC
|
||||
adcConfigMutable()->vbat.enabled = (batteryConfig()->voltageMeterSource == VOLTAGE_METER_ADC);
|
||||
adcConfigMutable()->current.enabled = (batteryConfig()->currentMeterSource == CURRENT_METER_ADC);
|
||||
|
||||
// The FrSky D SPI RX sends RSSI_ADC_PIN (if configured) as A2
|
||||
adcConfigMutable()->rssi.enabled = featureIsEnabled(FEATURE_RSSI_ADC);
|
||||
#ifdef USE_RX_SPI
|
||||
adcConfigMutable()->rssi.enabled |= (featureIsEnabled(FEATURE_RX_SPI) && rxSpiConfig()->rx_spi_protocol == RX_SPI_FRSKY_D);
|
||||
#endif
|
||||
adcInit(adcConfig());
|
||||
#endif
|
||||
|
||||
|
@ -864,8 +854,6 @@ void init(void)
|
|||
initFlags |= SD_INIT_ATTEMPTED;
|
||||
sdCardAndFSInit();
|
||||
}
|
||||
} else {
|
||||
blackboxConfigMutable()->device = BLACKBOX_DEVICE_NONE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue