function dodraw()
if not isblackout then
if dimfactor > 0 then
- for i=1, ledfb:size() do
- local g,r,b = ledfb:get(i)
- -- dimming, so mix the baseline "all channels on minimum" as 128/256ths
+ -- dimming, so mix the baseline "all channels on minimum" as 255/256ths
-- to act as a rounding factor. The image in "ledfb" will be mixed in
-- as 256/(dimfactor+1) 256ths
- doublefb:mix(256,baselinefb,256/(dimfactor+1),ledfb)
+ doublefb:mix(255,baselinefb,256/(dimfactor+1),ledfb)
ws2812.write(doublefb)
- end
else
ws2812.write(ledfb)
end
touch_db_blackout = tq:queue(300,onblackdebounce)
end
- -- XXX front left: dim the display
- if bit.isset(down,4) then
+ -- XXX left side back button: dim the display.
+ if bit.isset(down,7) then
dimdisplay()
-- Don't claim the image, just dim whatever is currently on the screen.
dodraw()
if bit.isset(down, 6) then
end
- -- XXX left side back button
- if bit.isset(down, 7) then
+ -- XXX front left
+ if bit.isset(down, 4) then
end
-- draw if we've claimed it!