66
66
"""Estimate the PWM levels for a two-channel driver.
67
67
Assume the first channel is the brighter one, and second will be used for moon/low modes.
71
73
step_size = (visual_max - visual_min) / (v['num_levels']-1)
74
76
for i in range(v['num_levels']):
76
78
# Up to the second channel's limit, calculate things just like a
77
79
# single-channel driver (first channel will be zero)
78
80
if goal_lm <= v['lm2_max']: