mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Merge branch 'betaflight' of https://github.com/borisbstyle/betaflight into betaflight
This commit is contained in:
commit
f44ceb0769
16 changed files with 46 additions and 30 deletions
14
Makefile
14
Makefile
|
@ -968,6 +968,16 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
|
|||
## all : default task; compile C code, build firmware
|
||||
all: binary
|
||||
|
||||
## all_targets : build all valid target platforms
|
||||
all_targets:
|
||||
for build_target in $(VALID_TARGETS); do \
|
||||
echo "Building $$build_target" && \
|
||||
make clean && \
|
||||
make -j TARGET=$$build_target || \
|
||||
break; \
|
||||
echo "Building $$build_target succeeded."; \
|
||||
done
|
||||
|
||||
## clean : clean up all temporary / machine-generated files
|
||||
clean:
|
||||
rm -f $(CLEAN_ARTIFACTS)
|
||||
|
@ -1017,6 +1027,10 @@ help: Makefile
|
|||
@echo ""
|
||||
@sed -n 's/^## //p' $<
|
||||
|
||||
## targets : print a list of all valid target platforms (for consumption by scripts)
|
||||
targets:
|
||||
@echo $(VALID_TARGETS)
|
||||
|
||||
## test : run the cleanflight test suite
|
||||
test:
|
||||
cd src/test && $(MAKE) test || true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Betaflight
|
||||
|
||||

|
||||

|
||||
|
||||
Clean-code version of baseflight flight-controller - flight controllers are used to fly multi-rotor craft and fixed wing craft.
|
||||
|
||||
|
|
|
@ -73,6 +73,10 @@
|
|||
#include "config/config_profile.h"
|
||||
#include "config/config_master.h"
|
||||
|
||||
#ifndef DEFAULT_RX_FEATURE
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PARALLEL_PWM
|
||||
#endif
|
||||
|
||||
#define BRUSHED_MOTORS_PWM_RATE 16000
|
||||
#define BRUSHLESS_MOTORS_PWM_RATE 400
|
||||
|
||||
|
@ -387,16 +391,12 @@ static void resetConf(void)
|
|||
memset(&masterConfig, 0, sizeof(master_t));
|
||||
setProfile(0);
|
||||
|
||||
masterConfig.version = EEPROM_CONF_VERSION;
|
||||
masterConfig.mixerMode = MIXER_QUADX;
|
||||
featureClearAll();
|
||||
#if defined(CJMCU) || defined(SPARKY) || defined(COLIBRI_RACE) || defined(MOTOLAB) || defined(SPRACINGF3MINI) || defined(LUX_RACE) || defined(DOGE) || defined(SINGULARITY) || defined(FURYF3)
|
||||
featureSet(FEATURE_RX_PPM);
|
||||
#endif
|
||||
|
||||
//#if defined(SPRACINGF3MINI)
|
||||
// featureSet(FEATURE_DISPLAY);
|
||||
//#endif
|
||||
featureSet(DEFAULT_RX_FEATURE | FEATURE_FAILSAFE | FEATURE_SUPEREXPO_RATES);
|
||||
#ifdef DEFAULT_FEATURES
|
||||
featureSet(DEFAULT_FEATURES);
|
||||
#endif
|
||||
|
||||
#ifdef BOARD_HAS_VOLTAGE_DIVIDER
|
||||
// only enable the VBAT feature by default if the board has a voltage divider otherwise
|
||||
|
@ -404,8 +404,8 @@ static void resetConf(void)
|
|||
featureSet(FEATURE_VBAT);
|
||||
#endif
|
||||
|
||||
featureSet(FEATURE_FAILSAFE);
|
||||
featureSet(FEATURE_SUPEREXPO_RATES);
|
||||
masterConfig.version = EEPROM_CONF_VERSION;
|
||||
masterConfig.mixerMode = MIXER_QUADX;
|
||||
|
||||
// global settings
|
||||
masterConfig.current_profile_index = 0; // default profile
|
||||
|
@ -579,7 +579,6 @@ static void resetConf(void)
|
|||
#endif
|
||||
|
||||
#ifdef SPRACINGF3
|
||||
featureSet(FEATURE_BLACKBOX);
|
||||
masterConfig.blackbox_device = 1;
|
||||
#ifdef TRANSPONDER
|
||||
static const uint8_t defaultTransponderData[6] = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC }; // Note, this is NOT a valid transponder code, it's just for testing production hardware
|
||||
|
@ -602,7 +601,6 @@ static void resetConf(void)
|
|||
#endif
|
||||
|
||||
#if defined(FURYF3)
|
||||
featureSet(FEATURE_BLACKBOX);
|
||||
masterConfig.blackbox_device = 2;
|
||||
masterConfig.blackbox_rate_num = 1;
|
||||
masterConfig.blackbox_rate_denom = 1;
|
||||
|
@ -614,16 +612,6 @@ static void resetConf(void)
|
|||
masterConfig.escAndServoConfig.maxthrottle = 1980;
|
||||
masterConfig.batteryConfig.vbatmaxcellvoltage = 45;
|
||||
masterConfig.batteryConfig.vbatmincellvoltage = 30;
|
||||
|
||||
featureSet(FEATURE_VBAT);
|
||||
featureSet(FEATURE_FAILSAFE);
|
||||
#endif
|
||||
|
||||
#ifdef SPRACINGF3EVO
|
||||
featureSet(FEATURE_TRANSPONDER);
|
||||
featureSet(FEATURE_RSSI_ADC);
|
||||
featureSet(FEATURE_CURRENT_METER);
|
||||
featureSet(FEATURE_TELEMETRY);
|
||||
#endif
|
||||
|
||||
// alternative defaults settings for ALIENFLIGHTF1 and ALIENFLIGHTF3 targets
|
||||
|
@ -704,14 +692,12 @@ static void resetConf(void)
|
|||
|
||||
// alternative defaults settings for SINGULARITY target
|
||||
#if defined(SINGULARITY)
|
||||
featureSet(FEATURE_BLACKBOX);
|
||||
masterConfig.blackbox_device = 1;
|
||||
masterConfig.blackbox_rate_num = 1;
|
||||
masterConfig.blackbox_rate_denom = 1;
|
||||
|
||||
masterConfig.batteryConfig.vbatscale = 77;
|
||||
|
||||
featureSet(FEATURE_RX_SERIAL);
|
||||
masterConfig.serialConfig.portConfigs[2].functionMask = FUNCTION_RX_SERIAL;
|
||||
#endif
|
||||
|
||||
|
@ -828,7 +814,7 @@ void activateConfig(void)
|
|||
void validateAndFixConfig(void)
|
||||
{
|
||||
if (!(featureConfigured(FEATURE_RX_PARALLEL_PWM) || featureConfigured(FEATURE_RX_PPM) || featureConfigured(FEATURE_RX_SERIAL) || featureConfigured(FEATURE_RX_MSP))) {
|
||||
featureSet(FEATURE_RX_PARALLEL_PWM); // Consider changing the default to PPM
|
||||
featureSet(FEATURE_RX_PARALLEL_PWM);
|
||||
}
|
||||
|
||||
if (featureConfigured(FEATURE_RX_PPM)) {
|
||||
|
|
|
@ -157,6 +157,7 @@
|
|||
//#define DISPLAY
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART2, PA3
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
#define SERIAL_RX
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define SONAR
|
||||
//#define GPS
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#define SERIAL_RX
|
||||
//#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART2, PA3
|
||||
|
|
|
@ -192,5 +192,6 @@
|
|||
#define SERIAL_RX
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
|
|
@ -190,6 +190,7 @@
|
|||
#define SERIAL_RX
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// Use UART3 for speksat
|
||||
|
|
|
@ -212,6 +212,8 @@
|
|||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define SONAR
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define DEFAULT_FEATURES FEATURE_BLACKBOX
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART3,
|
||||
|
|
|
@ -154,6 +154,7 @@
|
|||
|
||||
#define TELEMETRY
|
||||
#define SERIAL_RX
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
#define TELEMETRY
|
||||
#define BLACKBOX
|
||||
#define SERIAL_RX
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
//#define GPS
|
||||
//#define GTUNE
|
||||
#define DISPLAY
|
||||
|
|
|
@ -127,6 +127,8 @@
|
|||
#define GPS
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define DEFAULT_FEATURES (FEATURE_BLACKBOX | FEATURE_RX_SERIAL)
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART2, PA15
|
||||
|
|
|
@ -126,6 +126,7 @@
|
|||
#define TELEMETRY
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define LED_STRIP
|
||||
#if 1
|
||||
|
|
|
@ -158,6 +158,9 @@
|
|||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define DEFAULT_FEATURES FEATURE_BLACKBOX
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART3,
|
||||
#define BIND_PORT GPIOB
|
||||
|
|
|
@ -206,8 +206,6 @@
|
|||
#define TRANSPONDER_DMA_TC_FLAG DMA1_FLAG_TC2
|
||||
#define TRANSPONDER_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define GPS
|
||||
#define BLACKBOX
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
|
@ -217,6 +215,9 @@
|
|||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_TELEMETRY)
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART3,
|
||||
#define BIND_PORT GPIOB
|
||||
|
|
|
@ -212,10 +212,10 @@
|
|||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
#define TELEMETRY
|
||||
#define SERIAL_RX
|
||||
#define AUTOTUNE
|
||||
#define DISPLAY
|
||||
#define USE_SERVOS
|
||||
#define USE_CLI
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
|
||||
#define BUTTONS
|
||||
#define BUTTON_A_PORT GPIOB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue