Skip to content
Commit 73df56b6 authored by Keith Packard's avatar Keith Packard Committed by Carles Cufí
Browse files

modules/hal/st: Merge clang abs type fix



FixPoint1616_t is typedef'd to uint32_t. The result of dividing two
variables of that type is also unsigned. Passing an unsigned value to abs
doesn't make sense.

Cast the value to int32_t in case the computaton of diff1_mcps generates a
negative result so that xTalkCorrection doesn't end up with a huge value.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 62191ba8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment