I want to implement a bipolar poti which represents the following values for a target: -12, -6, -3, -2, 1, 2, 3, 6, 12. The value 1 should be the default one. Additionally, the poti should have a wider center position so that the default value can be reached more easily when turning the poti. The custom scale was pretty straight forward with a formatter like this:
local division_map = {
[-4] = '/12',
[-3] = '/6',
[-2] = '/3',
[-1] = '/2',
[0] = '1',
[1] = 'x2',
[2] = 'x3',
[3] = 'x6',
[4] = 'x12'
}
function toDivision(valueObject, value)
return division_map[value]
end
But how do I implement the dead zone in the middle? Ideally, I’d also like to adjust the amount of physical motion of the poti required to change a value.