mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
UI and Web updates (#1421)
* Stop Web-Capture when priority changes * Remote control UI: Treat duration=0 as endless * Stop Web-Capture on non-Image events changes * LED Matrix Layout - Support vertical cabling direction * Additional Yeelight models * Treat http headers case insensitive * Update change log * Treat http headers case insensitive (consider Qt version) * API - Consider provided format when setImage * UI - Support Boblight configuration per LED instance * Support multiple Boblight clients with different priorities * Update changelog * Simplify isGUI rules allowing for QT only builds * Sysinfo: Fix indents * LED-Devices: Show warning, if get properties failed * Qt-Grabber: Fixed position handling of multiple monitors * LED layout: Remove indention limitations * Yeelight: Test YLTD003 * hyperion-remote: Provide image filename to muxer/UI * Refactor PriorityMuxer and related * Temp: Build under Windows 2019 * Yeelight: Remove YLTD003 as it is not working without additional changes * Test Windows-latest with out removing redistributables/new MSVC * correct workflows * correct CI script * Build Windows with Qt 5.15.2 * Priority Muxer: Updates after testing * Fix Typo * Update BGHandler * QTGrabber - Reactivate windows code to avoid cursor issues * Emit prioritiesChanged when autoselect was changed by user Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -277,7 +277,7 @@ function createClassicLeds() {
|
||||
aceEdt.set(finalLedArray);
|
||||
}
|
||||
|
||||
function createMatrixLayout(ledshoriz, ledsvert, cabling, start) {
|
||||
function createMatrixLayout(ledshoriz, ledsvert, cabling, start, direction) {
|
||||
// Big thank you to RanzQ (Juha Rantanen) from Github for this script
|
||||
// https://raw.githubusercontent.com/RanzQ/hyperion-audio-effects/master/matrix-config.js
|
||||
|
||||
@@ -325,15 +325,30 @@ function createMatrixLayout(ledshoriz, ledsvert, cabling, start) {
|
||||
|
||||
var x, y
|
||||
|
||||
for (y = startY; downward && y <= endY || !downward && y >= endY; y += downward ? 1 : -1) {
|
||||
if (direction === 'vertical') {
|
||||
for (x = startX; forward && x <= endX || !forward && x >= endX; x += forward ? 1 : -1) {
|
||||
addLed(x, y)
|
||||
for (y = startY; downward && y <= endY || !downward && y >= endY; y += downward ? 1 : -1) {
|
||||
|
||||
addLed(x, y)
|
||||
}
|
||||
if (!parallel) {
|
||||
downward = !downward
|
||||
var tmp = startY
|
||||
startY = endY
|
||||
endY = tmp
|
||||
}
|
||||
}
|
||||
if (!parallel) {
|
||||
forward = !forward
|
||||
var tmp = startX
|
||||
startX = endX
|
||||
endX = tmp
|
||||
} else {
|
||||
for (y = startY; downward && y <= endY || !downward && y >= endY; y += downward ? 1 : -1) {
|
||||
for (x = startX; forward && x <= endX || !forward && x >= endX; x += forward ? 1 : -1) {
|
||||
addLed(x, y)
|
||||
}
|
||||
if (!parallel) {
|
||||
forward = !forward
|
||||
var tmp = startX
|
||||
startX = endX
|
||||
endX = tmp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,9 +363,10 @@ function createMatrixLeds() {
|
||||
var ledshoriz = parseInt($("#ip_ma_ledshoriz").val());
|
||||
var ledsvert = parseInt($("#ip_ma_ledsvert").val());
|
||||
var cabling = $("#ip_ma_cabling").val();
|
||||
var direction = $("#ip_ma_direction").val();
|
||||
var start = $("#ip_ma_start").val();
|
||||
|
||||
nonBlacklistLedArray = createMatrixLayout(ledshoriz, ledsvert, cabling, start);
|
||||
nonBlacklistLedArray = createMatrixLayout(ledshoriz, ledsvert, cabling, start, direction);
|
||||
finalLedArray = blackListLeds(nonBlacklistLedArray, ledBlacklist);
|
||||
|
||||
createLedPreview(finalLedArray, 'matrix');
|
||||
@@ -467,7 +483,63 @@ $(document).ready(function () {
|
||||
|
||||
// bind change event to all inputs
|
||||
$('.ledCLconstr').bind("change", function () {
|
||||
valValue(this.id, this.value, this.min, this.max);
|
||||
|
||||
//Ensure Values are in min/max ranges
|
||||
if ($(this).val() < $(this).attr('min') * 1) { $(this).val($(this).attr('min')); }
|
||||
if ($(this).val() > $(this).attr('max') * 1) { $(this).val($(this).attr('max')); }
|
||||
|
||||
//top/bottom and left/right must not overlap
|
||||
switch (this.id) {
|
||||
case "ip_cl_ptlh":
|
||||
var ptrh = parseInt($("#ip_cl_ptrh").val());
|
||||
if (this.value > ptrh) {
|
||||
$(this).val(ptrh);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_ptrh":
|
||||
var ptlh = parseInt($("#ip_cl_ptlh").val());
|
||||
if (this.value < ptlh) {
|
||||
$(this).val(ptlh);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_pblh":
|
||||
var pbrh = parseInt($("#ip_cl_pbrh").val());
|
||||
if (this.value > pbrh) {
|
||||
$(this).val(pbrh);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_pbrh":
|
||||
var pblh = parseInt($("#ip_cl_pblh").val());
|
||||
if (this.value < pblh) {
|
||||
$(this).val(pblh);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_ptlv":
|
||||
var pblv = parseInt($("#ip_cl_pblv").val());
|
||||
if (this.value > pblv) {
|
||||
$(this).val(pblv);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_pblv":
|
||||
var ptlv = parseInt($("#ip_cl_ptlv").val());
|
||||
if (this.value < ptlv) {
|
||||
$(this).val(ptlv);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_ptrv":
|
||||
var pbrv = parseInt($("#ip_cl_pbrv").val());
|
||||
if (this.value > pbrv) {
|
||||
$(this).val(pbrv);
|
||||
}
|
||||
break;
|
||||
case "ip_cl_pbrv":
|
||||
var ptrv = parseInt($("#ip_cl_ptrv").val());
|
||||
if (this.value < ptrv) {
|
||||
$(this).val(ptrv);
|
||||
}
|
||||
|
||||
default:
|
||||
}
|
||||
createClassicLeds();
|
||||
});
|
||||
|
||||
@@ -1591,6 +1663,7 @@ async function getProperties_device(ledType, key, params) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
showNotification('warning', $.i18n('conf_leds_error_get_properties_text'), $.i18n('conf_leds_error_get_properties_title'))
|
||||
$('#btn_submit_controller').attr('disabled', true);
|
||||
$('#btn_test_controller').attr('disabled', true);
|
||||
}
|
||||
@@ -1691,6 +1764,7 @@ function updateElements(ledType, key) {
|
||||
$("#ip_ma_ledshoriz").val(ledProperties.maxColumn);
|
||||
$("#ip_ma_ledsvert").val(ledProperties.maxRow);
|
||||
$("#ip_ma_cabling").val("parallel");
|
||||
$("#ip_ma_direction").val("horizontal");
|
||||
$("#ip_ma_start").val("top-left");
|
||||
createMatrixLeds();
|
||||
}
|
||||
|
Reference in New Issue
Block a user