light: more refactoring related input & value stages

Fixes color+(white or cct) brightness function factor calculation
to actually do what the comment says it does.

No more unsigned char for value, consistent integer math and
explicit clamping of the input & output values.

As a follow-up for the a55cf0b, reworks brightness functions:
- value input and application implemented as part of the channel class
- track value changes externally, no need for OnceFlag
- simple all, only-rgb, color+white and color+cct are distinct
  functions, where brightness classes implement the actual math
- avoid accidentally doing an actual function call through
  `lightChannels()` by not accessing channels elements & size directly
  through the vector (yay c++ strictness regarding *public* symbols)
This commit is contained in:
Maxim Prokhorov
2021-08-30 13:44:56 +03:00
parent dd4426b77f
commit 32aae70374
2 changed files with 457 additions and 296 deletions

File diff suppressed because it is too large Load Diff