geekscape / aiko_engine_mp

microPython event based engine supporting network messages (MQTT), times and various hardware drivers
Other
22 stars 24 forks source link

Fix mapping from slider values to menu items. #34

Open garthk opened 3 years ago

garthk commented 3 years ago

Distributes inputs in the range 0..100 evenly across the menu items, fixing a bug making it almost impossible to select the first item.

I'm happy with the logic. I'm sure there's a shorter, clearer version of the expression in slider_zone. I'm very sure the slider_zone function belongs elsewhere; @geekscape do you want to move it yourself afterward, or should I move it now?