1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Use lrintf to round floats to integers

This commit is contained in:
Mathias Rasmussen 2021-12-04 20:29:42 +01:00 committed by KarateBrot
parent b84b8c1ca5
commit 34ee2f67c9
8 changed files with 29 additions and 31 deletions

View file

@ -580,7 +580,7 @@ FAST_CODE void processRcCommand(void)
}
rawSetpoint[axis] = constrainf(angleRate, -1.0f * currentControlRateProfile->rate_limit[axis], 1.0f * currentControlRateProfile->rate_limit[axis]);
DEBUG_SET(DEBUG_ANGLERATE, axis, angleRate);
DEBUG_SET(DEBUG_ANGLERATE, axis, lrintf(angleRate));
}
// adjust raw setpoint steps to camera angle (mixing Roll and Yaw)
if (rxConfig()->fpvCamAngleDegrees && IS_RC_MODE_ACTIVE(BOXFPVANGLEMIX) && !FLIGHT_MODE(HEADFREE_MODE)) {