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:
Keith Packard <keithp@keithp.com>
Loading
Please sign in to comment