Using the multimap two types code.
The input array was type float and output array was type uint16_t.
Furthermore the output array was decreasing.
This causes the formula to overflow (e.g. 1750 - 2000 = 65286 instead of 250).
Solution was to use int16_t instead (as the output range still fitted).
Alternative solution could be "decrease detection" and use another formula. (all MM variations).
If this is possible and how it affects the performance is to be investigated.
At least documentation should mention this more explicitly.
Using the multimap two types code.
The input array was type float and output array was type uint16_t.
Furthermore the output array was decreasing.
This causes the formula to overflow (e.g. 1750 - 2000 = 65286 instead of 250).
Solution was to use int16_t instead (as the output range still fitted).
Alternative solution could be "decrease detection" and use another formula. (all MM variations).
If this is possible and how it affects the performance is to be investigated.
At least documentation should mention this more explicitly.