1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Merge pull request #11910 from blckmn/sitl

This commit is contained in:
J Blackman 2022-10-22 20:49:37 +11:00 committed by GitHub
commit 950d586e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -171,7 +171,7 @@ LEGACY_TARGETS := MATEKF405 \
# Temporarily excluded to get CI coverage for USE_SPI_TRANSACTION
# STM32F4DISCOVERY \
CI_TARGETS := $(UNIFIED_TARGETS)
CI_TARGETS := $(UNIFIED_TARGETS) SITL
TARGETS_TOTAL := $(words $(CI_TARGETS))
TARGET_GROUPS := 3

View file

@ -767,7 +767,9 @@ void init(void)
#ifdef USE_GPS
if (featureIsEnabled(FEATURE_GPS)) {
gpsInit();
#ifdef USE_GPS_RESCUE
gpsRescueInit();
#endif
}
#endif

View file

@ -437,7 +437,7 @@ static void applyMixerAdjustmentLinear(float *motorMix, const bool airmodeEnable
motorDeltaScale *= airmodeTransitionPercent; // this should be half of the motor authority allowed
}
const float motorMixNormalizationFactor = motorMixRange > 1.0 ? airmodeTransitionPercent / motorMixRange : airmodeTransitionPercent;
const float motorMixNormalizationFactor = motorMixRange > 1.0f ? airmodeTransitionPercent / motorMixRange : airmodeTransitionPercent;
const float motorMixDelta = motorDeltaScale * motorMixRange;
@ -475,7 +475,7 @@ static void applyMixerAdjustment(float *motorMix, const float motorMixMin, const
airmodeTransitionPercent = scaleRangef(throttle, 0.0f, 0.5f, 0.5f, 1.0f); // 0.5 throttle is full transition, and 0.0 throttle is 50% airmodeTransitionPercent
}
const float motorMixNormalizationFactor = motorMixRange > 1.0 ? airmodeTransitionPercent / motorMixRange : airmodeTransitionPercent;
const float motorMixNormalizationFactor = motorMixRange > 1.0f ? airmodeTransitionPercent / motorMixRange : airmodeTransitionPercent;
for (int i = 0; i < mixerRuntime.motorCount; i++) {
motorMix[i] *= motorMixNormalizationFactor;