Skip to content

Commit

Permalink
feat: generación de tabla con N puntos
Browse files Browse the repository at this point in the history
  • Loading branch information
barreiroleo committed Sep 19, 2021
1 parent 8514a74 commit 69793df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 69793df

Please sign in to comment.