Fixed use of 'abs()' for floats. (#9242)
Fixed use of 'abs()' for floats.
This commit is contained in:
commit
cb538ea2ed
2
Makefile
2
Makefile
|
@ -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)) \
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue