new brightness handling (#430)

* clean color adjustment

* now a prio duration of "0" means infinity

* implement dynamic 'just in time' initialization

* implement new brightness handling

* cahnge access level

* i18n fix

* - cleanup brightness stuff
- update webserver, now with initial ssl support

* - backlightThreshold is now 0-100 instead 0-1
- better performance for brightness - use piecewise linear instead of sqrt
This commit is contained in:
redPanther
2017-04-03 05:19:05 +02:00
committed by GitHub
parent 852f7b86bb
commit 5ea3c752b5
22 changed files with 366 additions and 139 deletions

View File

@@ -439,8 +439,10 @@
"edt_conf_color_backlightThreshold_expl" : "Eine Beleuchtung die dauerhaft aktiv ist. (Automatisch deaktiviert bei Effekten, Farben oder im Zustand \"Aus\")",
"edt_conf_color_backlightColored_title" : "Farbige Hintergrund - beleuchtung",
"edt_conf_color_backlightColored_expl" : "Die Hintergrundbeleuchtung kann mit oder ohne Farbanteile genutzt werden.",
"edt_conf_color_brightness_title" : "Maximale Helligkeit",
"edt_conf_color_brightness_expl" : "Zwischen 0.0 und 0.5 ist die Helligkeit linearisiert. Von 0.5 bis 1.0 wird cyan, magenta und gelb bis zu 2x heller und weiß bis zu 3x.",
"edt_conf_color_brightness_title" : "Helligkeit",
"edt_conf_color_brightness_expl" : "die desamt Helligkeit",
"edt_conf_color_brightnessComp_title" : "Helligkeits Kompensation",
"edt_conf_color_brightnessComp_expl" : "Kompensiert unterschiede in der Helligkeit zwischen RGB, CMY und weiß. 100 ist volle Kompensation, 0 keine Kompensation",
"edt_conf_smooth_heading_title" : "Glättung",
"edt_conf_smooth_type_title" : "Art",
"edt_conf_smooth_type_expl" : "Algorithmus der Glättung.",

View File

@@ -440,8 +440,10 @@
"edt_conf_color_backlightThreshold_expl" : "The minimum amount of brightness (backlight). Disabled during effects, colors and in status \"Off\"",
"edt_conf_color_backlightColored_title" : "Colored backlight",
"edt_conf_color_backlightColored_expl" : "Add some color to your backlight.",
"edt_conf_color_brightness_title" : "maximal brightness",
"edt_conf_color_brightness_expl" : "From 0.0 to 0.5 the brightness is linearised, from 0.5 to 1.0 cyan, magenta, yellow is up to 2x brighter and white 3x.",
"edt_conf_color_brightness_title" : "brightness",
"edt_conf_color_brightness_expl" : "set overall brightness of leds",
"edt_conf_color_brightnessComp_title" : "Brightness Compensation",
"edt_conf_color_brightnessComp_expl" : "compensates bightness differences between RGB, CMY and white. 100 means full compensation, 0 no compensation",
"edt_conf_smooth_heading_title" : "Smoothing",
"edt_conf_smooth_type_title" : "Type",
"edt_conf_smooth_type_expl" : "Type of smoothing.",

View File

@@ -53,8 +53,8 @@ $(document).ready(function() {
}
else
{
if(sColor[key].key == "brightness" || sColor[key].key == "backlightThreshold")
property = '<input id="cr_'+sColor[key].key+'" type="number" class="form-control" min="0" max="1.0" step="0.05" value="'+value+'"/>';
if(sColor[key].key == "backlightThreshold" || sColor[key].key == "brightness" || sColor[key].key == "brightnessCompensation")
property = '<input id="cr_'+sColor[key].key+'" type="number" class="form-control" min="0" max="100" step="10" value="'+value+'"/>';
else
property = '<input id="cr_'+sColor[key].key+'" type="number" class="form-control" min="0.1" max="4.0" step="0.1" value="'+value+'"/>';

View File

@@ -41,7 +41,7 @@ function cron()
function connectionLostDetection(type)
{
if ( watchdog > 1 )
if ( watchdog > 2 )
{
var interval_id = window.setInterval("", 9999); // Get a reference to the last
for (var i = 1; i < interval_id; i++)

View File

@@ -235,14 +235,14 @@ function valValue(id,value,min,max)
{
if(typeof max === 'undefined' || max == "")
max = 999999;
if(value > max)
if(Number(value) > Number(max))
{
$('#'+id).val(max);
showInfoDialog("warning","",$.i18n('edt_msg_error_maximum_incl',max));
return max;
}
else if(value < min)
else if(Number(value) < Number(min))
{
$('#'+id).val(min);
showInfoDialog("warning","",$.i18n('edt_msg_error_minimum_incl',min));