Brightness scaling
Posted: Thu Jun 21, 2018 2:43 am
Looking at the ShiftX2 API, there seems to be a value that isn't set in any of the demo code, brightness scaling.
It's in the "Set Configuration Parameters Group 1" section here:
https://wiki.autosportlabs.com/ShiftX2
Does this value determine the brightness of the LEDs when in auto-brightness mode? I've implemented it in my script but havent had a chance to really test it. I hoping i can keep autodimming, but turn down the overall brightness a bit.
Here's my test code, not totally sure that it works:
Thanks,
Dan
It's in the "Set Configuration Parameters Group 1" section here:
https://wiki.autosportlabs.com/ShiftX2
Does this value determine the brightness of the LEDs when in auto-brightness mode? I've implemented it in my script but havent had a chance to really test it. I hoping i can keep autodimming, but turn down the overall brightness a bit.
Here's my test code, not totally sure that it works:
Code: Select all
--Brightness, 0-100. 0=automatic brightness
sxBright=0
sxBrightScale = 45 --0-255 default is 51
function sxInit()
println('config shiftX2')
setBaseConfig(sxBright,sxBrightScale)
if sxOnInit~=nil then sxOnInit() end
end
function setBaseConfig(bright, brightscale)
sxTx(3,{bright, brightscale})
end
Dan