Map Function
This function allows to convert a value from one range to another range:
The function is especially useful for analog inputs. |
I've added checks on the output, so the returned value can't exceed the range bounds ymin and ymax.
Inputs and output are integers, but internal calculations are done with floatings. Once again, avoiding the spaghetti syndrome was impossible! |
Download
Download the driver with an example for RoboPro.
This file is under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. |
|