As part of @joshuasing's review on #17, updated variables & constants to
match the Go best practices.
Signed-off-by: Cameron Fleming <cameron@nevexo.space>
This allows them to only be started if necessary. If the user has chosen
to keep the display on and not-dimmed all the time, the tickers can't
start as their tick value must be a positive integer.
Adds the force boolean to wakedisplay() which allows skipping the
backlightState == 0 check, this means you can force a ticker reset, even
if the display is currently in the "full bright" state
As suggested by tutman in https://github.com/jetkvm/kvm/pull/17, use
tickers set to the duration of dim/off to avoid a loop running every
second. The tickers are reset to the dim/off times whenever
wakeDisplay() is called.
Implements setDisplayBrightness(brightness int) which allows setting the
backlight brightness on JetKVM's hardware.
Needs to be implemented into the RPC, config and frontend.