Implement a helper for calculating velocity based thresholds for tmc drivers. This code was written in such a way that it can be used with more fields than just tpwmthrs. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>