1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Fixed use of 'abs()' for floats.

This commit is contained in:
mikeller 2019-11-29 03:54:14 +13:00
parent 9637aba9d0
commit 935a684765
2 changed files with 2 additions and 2 deletions

View file

@ -239,7 +239,7 @@ CC_NO_OPTIMISATION :=
#
# Added after GCC version update, remove once the warnings have been fixed
#
TEMPORARY_FLAGS := -Wno-absolute-value
TEMPORARY_FLAGS :=
CFLAGS += $(ARCH_FLAGS) \
$(addprefix -D,$(OPTIONS)) \

View file

@ -996,7 +996,7 @@ static FAST_CODE void checkForYawSpin(timeUs_t currentTimeUs)
} else {
#ifndef SIMULATOR_BUILD
// check for spin on yaw axis only
if (abs(gyro.gyroADCf[Z]) > gyroConfig()->yaw_spin_threshold) {
if (abs((int)gyro.gyroADCf[Z]) > gyroConfig()->yaw_spin_threshold) {
yawSpinDetected = true;
yawSpinTimeUs = currentTimeUs;
}