onlaj / Piano-LED-Visualizer

Piano LED Visualizer: Connect an LED strip to your Raspberry Pi and create an immersive visual experience for your piano playing
MIT License
542 stars 115 forks source link

rounding speed_period_in_seconds on editing to keep them in a .1 step size #311

Closed SirLefti closed 2 years ago

SirLefti commented 2 years ago

Editing the period attribute in the speed LED mode had some display issues due to .1 not being representable exactly in binary form (see image). I tried formatting first, but this had some issues:

Rounding should be more straightforward and less error prone. I am happy to contribute again :)

20220108_122633

onlaj commented 2 years ago

Thanks!