1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00

Fix compiliation for F1 targets

Fix a missing MCU check for ADC devices and reduce the number of profiles/rateprofiles to 2 and 3 respectively to get the config under 2K.
This commit is contained in:
Bruce Luckcuck 2019-01-31 07:53:56 -05:00
parent 4f7fa25b06
commit 87b077b59b
4 changed files with 6 additions and 3 deletions

View file

@ -24,8 +24,6 @@
#include "pg/pg.h" #include "pg/pg.h"
#define CONTROL_RATE_PROFILE_COUNT 6
typedef enum { typedef enum {
RATES_TYPE_BETAFLIGHT = 0, RATES_TYPE_BETAFLIGHT = 0,
RATES_TYPE_RACEFLIGHT, RATES_TYPE_RACEFLIGHT,

View file

@ -41,8 +41,10 @@ void pgResetFn_adcConfig(adcConfig_t *adcConfig)
{ {
adcConfig->device = ADC_DEV_TO_CFG(adcDeviceByInstance(ADC_INSTANCE)); adcConfig->device = ADC_DEV_TO_CFG(adcDeviceByInstance(ADC_INSTANCE));
adcConfig->dmaopt[ADCDEV_1] = ADC1_DMA_OPT; adcConfig->dmaopt[ADCDEV_1] = ADC1_DMA_OPT;
#ifndef STM32F1
adcConfig->dmaopt[ADCDEV_2] = ADC2_DMA_OPT; adcConfig->dmaopt[ADCDEV_2] = ADC2_DMA_OPT;
adcConfig->dmaopt[ADCDEV_3] = ADC3_DMA_OPT; adcConfig->dmaopt[ADCDEV_3] = ADC3_DMA_OPT;
#endif
#ifdef VBAT_ADC_PIN #ifdef VBAT_ADC_PIN
adcConfig->vbat.enabled = true; adcConfig->vbat.enabled = true;

View file

@ -145,10 +145,12 @@
#define USE_SERIALRX_SPEKTRUM // SRXL, DSM2 and DSMX protocol #define USE_SERIALRX_SPEKTRUM // SRXL, DSM2 and DSMX protocol
#define USE_SERIALRX_SUMD // Graupner Hott protocol #define USE_SERIALRX_SUMD // Graupner Hott protocol
#if (FLASH_SIZE > 64) #if (FLASH_SIZE > 128)
#define PID_PROFILE_COUNT 3 #define PID_PROFILE_COUNT 3
#define CONTROL_RATE_PROFILE_COUNT 6
#else #else
#define PID_PROFILE_COUNT 2 #define PID_PROFILE_COUNT 2
#define CONTROL_RATE_PROFILE_COUNT 3
#endif #endif
#if (FLASH_SIZE > 64) #if (FLASH_SIZE > 64)

View file

@ -33,6 +33,7 @@
#define FAST_RAM #define FAST_RAM
#define PID_PROFILE_COUNT 3 #define PID_PROFILE_COUNT 3
#define CONTROL_RATE_PROFILE_COUNT 6
#define USE_MAG #define USE_MAG
#define USE_BARO #define USE_BARO
#define USE_GPS #define USE_GPS