mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix Smoothing configuration (#1476)
* Fix Smoothing out of sync when saving * Only force Smoothing for new devices * Re-Add Max/Min Brightness titles * UI - Fix: Correctly lookup current Instance Name in case instance IDs are not in order * Fix/Update AtmoOrb Firmware images
This commit is contained in:
@@ -1631,7 +1631,10 @@ function saveLedConfig(genDefLayout = false) {
|
||||
case "cololight":
|
||||
|
||||
var host = conf_editor.getEditor("root.specificOptions.host").getValue();
|
||||
result.smoothing = { enable: false };
|
||||
if (window.serverConfig.device.type !== ledType) {
|
||||
//smoothing off, if new device
|
||||
result.smoothing = { enable: false };
|
||||
}
|
||||
|
||||
if (genDefLayout === true) {
|
||||
|
||||
@@ -1667,7 +1670,11 @@ function saveLedConfig(genDefLayout = false) {
|
||||
|
||||
case "nanoleaf":
|
||||
case "wled":
|
||||
result.smoothing = { enable: false };
|
||||
case "yeelight":
|
||||
if (window.serverConfig.device.type !== ledType) {
|
||||
//smoothing off, if new device
|
||||
result.smoothing = { enable: false };
|
||||
}
|
||||
|
||||
case "adalight":
|
||||
case "atmo":
|
||||
|
@@ -171,7 +171,7 @@ function initLanguageSelection() {
|
||||
}
|
||||
|
||||
function updateUiOnInstance(inst) {
|
||||
$("#active_instance_friendly_name").text(window.serverInfo.instance[inst].friendly_name);
|
||||
$("#active_instance_friendly_name").text(getInstanceNameByIndex(inst));
|
||||
if (window.serverInfo.instance.filter(entry => entry.running).length > 1) {
|
||||
$('#btn_hypinstanceswitch').toggle(true);
|
||||
$('#active_instance_dropdown').prop('disabled', false);
|
||||
|
@@ -1126,15 +1126,19 @@ function beginWizardHue() {
|
||||
d.useEntertainmentAPI = false;
|
||||
d.hardwareLedCount = finalLightIds.length;
|
||||
d.verbose = false;
|
||||
//smoothing off
|
||||
sc.smoothing.enable = false;
|
||||
if (window.serverConfig.device.type !== d.type) {
|
||||
//smoothing off, if new device
|
||||
sc.smoothing = { enable: false };
|
||||
}
|
||||
}
|
||||
|
||||
if (hueType == 'philipshueentertainment') {
|
||||
d.useEntertainmentAPI = true;
|
||||
d.hardwareLedCount = groupLights.length;
|
||||
//smoothing on
|
||||
sc.smoothing.enable = true;
|
||||
if (window.serverConfig.device.type !== d.type) {
|
||||
//smoothing on, if new device
|
||||
sc.smoothing = { enable: true };
|
||||
}
|
||||
}
|
||||
|
||||
window.serverConfig.device = d;
|
||||
@@ -1430,6 +1434,8 @@ function beginWizardYeelight() {
|
||||
window.serverConfig.leds = yeelightLedConfig;
|
||||
|
||||
//LED device config
|
||||
var currentDeviceType = window.serverConfig.device.type;
|
||||
|
||||
//Start with a clean configuration
|
||||
var d = {};
|
||||
|
||||
@@ -1454,9 +1460,10 @@ function beginWizardYeelight() {
|
||||
|
||||
window.serverConfig.device = d;
|
||||
|
||||
//smoothing off
|
||||
if (!(window.serverConfig.smoothing == null))
|
||||
window.serverConfig.smoothing.enable = false;
|
||||
if (currentDeviceType !== d.type) {
|
||||
//smoothing off, if new device
|
||||
window.serverConfig.smoothing = { enable: false };
|
||||
}
|
||||
|
||||
requestWriteConfig(window.serverConfig, true);
|
||||
resetWizard();
|
||||
|
Reference in New Issue
Block a user