Hello all,
I have a dial included in this post.
I'm getting a value from an external party that is in between the range of the dial display values.
The dial display values are 80, 330, 440, 800.
The scale internally for the dial goes from 0 to 1000.
So internally the values go from 0 to 333 (red), 334 to 666 (green), 667 to 1000 (yellow).
Examples:
- When I got a value 50 from external, the dial must stay on 80, 0 internally
- When I got a value 90 from external, the dial is in the first part, visually close to 80, internally close to 0
- When I got a value 320 from external, the dial is in the first part, visually close to 330, internally close to 333
- When I got a value 335 from external, the dial is in the second part, visually close to 330, internally close to 333
- When I got a value 435 from external, the dial is in the second part, visually close to 440, internally close to 666
- When I got a value 795 from external, the dial is in the third part, visually close to 800, internally close to 1000
- When I got a value 900 from external, the dial must stay on 800, 1000 internally
So I need a formula to translate the external value to the internal value.
I've tried but without success.
I want the dial to be smooth progressing.
Thanks.