Browse Source

lights: toRGB default arg

master
Max Prokhorov 5 years ago
parent
commit
7959863526
2 changed files with 2797 additions and 3075 deletions
  1. +1
    -5
      code/espurna/light.ino
  2. +2796
    -3070
      code/espurna/static/index.light.html.gz.h

+ 1
- 5
code/espurna/light.ino View File

@ -366,7 +366,7 @@ void _fromMireds(unsigned long mireds) {
// Output Values // Output Values
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void _toRGB(char * rgb, size_t len, bool target) {
void _toRGB(char * rgb, size_t len, bool target = false) {
unsigned long value = 0; unsigned long value = 0;
value += target ? _light_channel[0].target : _light_channel[0].inputValue; value += target ? _light_channel[0].target : _light_channel[0].inputValue;
@ -378,10 +378,6 @@ void _toRGB(char * rgb, size_t len, bool target) {
snprintf_P(rgb, len, PSTR("#%06X"), value); snprintf_P(rgb, len, PSTR("#%06X"), value);
} }
void _toRGB(char * rgb, size_t len) {
_toRGB(rgb, len, false);
}
void _toHSV(char * hsv, size_t len) { void _toHSV(char * hsv, size_t len) {
double h {0.}, s {0.}, v {0.}; double h {0.}, s {0.}, v {0.};
double r {0.}, g {0.}, b {0.}; double r {0.}, g {0.}, b {0.};


+ 2796
- 3070
code/espurna/static/index.light.html.gz.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save