From 69793df98f99cb0d7a32ac7aeb505594b05bbf4f Mon Sep 17 00:00:00 2001 From: LeoBarreiro Date: Sun, 19 Sep 2021 00:26:32 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20generaci=C3=B3n=20de=20tabla=20con=20N?= =?UTF-8?q?=20puntos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 83ed225..9b6fd0f 100644 --- a/main.py +++ b/main.py @@ -69,9 +69,11 @@ def do_tint_solve(val): dimmer.print_dimmer_state() def do_tint_table_solve(val): - for i in range(100+1): - tint = dimmer.solve_tint_for_duty(i) - print(f"duty({tint*1e3:>13.10f} ms)= {i:>6.2f}%") + points = 256 + for i in range(points + 1): + duty = i * 100 / points + tint = dimmer.solve_tint_for_duty(duty) + print(f"n: {i:<3} -> duty({tint*1e3:>13.10f} ms)= {duty:>6.2f}%") dimmer.print_dimmer_state() ax_frec = plt.axes([0.12, 0.10, 0.80, 0.03])