CHanges 26.12.2019 Correction and PowerOff add

This commit is contained in:
SputnikElf
2019-12-26 16:34:40 +01:00
parent ccd01c1ce2
commit aef4e3a571
14 changed files with 353 additions and 255 deletions

View File

@@ -71,6 +71,7 @@ $(document).ready( function() {
$('#dash_statush').html(hyperion_enabled ? '<span style="color:green">'+$.i18n('general_btn_on')+'</span>' : '<span style="color:red">'+$.i18n('general_btn_off')+'</span>');
$('#btn_hsc').html(hyperion_enabled ? '<button class="btn btn-sm btn-danger" onClick="requestSetComponentState(\'ALL\',false)">'+$.i18n('dashboard_infobox_label_disableh')+'</button>' : '<button class="btn btn-sm btn-success" onClick="requestSetComponentState(\'ALL\',true)">'+$.i18n('dashboard_infobox_label_enableh')+'</button>');
$('#btn_pltfpoweroff').html('<button class="btn btn-sm btn-danger" onClick="requestPlatformShutdown()">'+$.i18n('dashboard_infobox_label_pltfpoweroff')+'</button>');
}
// add more info

33
assets/webconfig/js/content_leds.js Normal file → Executable file
View File

@@ -76,7 +76,8 @@ function createClassicLeds(){
var edgeVGap = parseInt($("#ip_cl_edgegap").val())/100/2;
//var cornerVGap = parseInt($("#ip_cl_cornergap").val())/100/2;
var overlap = $("#ip_cl_overlap").val()/100;
//corner values %
//trapezoid values % -> float
var ptblh = parseInt($("#ip_cl_pblh").val())/100;
var ptblv = parseInt($("#ip_cl_pblv").val())/100;
var ptbrh = parseInt($("#ip_cl_pbrh").val())/100;
@@ -85,7 +86,7 @@ function createClassicLeds(){
var pttlv = parseInt($("#ip_cl_ptlv").val())/100;
var pttrh = parseInt($("#ip_cl_ptrh").val())/100;
var pttrv = parseInt($("#ip_cl_ptrv").val())/100;
//helper
var edgeHGap = edgeVGap/(16/9);
//var cornerHGap = cornerVGap/(16/9);
@@ -163,19 +164,6 @@ function createClassicLeds(){
}
}
function createLeftLeds(){
var steph = (ptblh - pttlh)/ledsleft;
var stepv = (ptblv - pttlv - (2*edgeVGap))/ledsleft;
for (var i = ledsleft-1; i>-1; i--){
var hmin = pttlh+(steph*Number([i]));
var hmax = hmin+ledsVDepth;
var vmin = ovl("-",pttlv+(stepv*Number([i]))+edgeVGap);
var vmax = ovl("+",pttlv+(stepv*Number([i+1]))+edgeVGap);
createLedArray(hmin, hmax, vmin, vmax);
}
}
function createRightLeds(){
var steph = (ptbrh - pttrh)/ledsright;
var stepv = (ptbrv - pttrv - (2*edgeVGap))/ledsright;
@@ -202,6 +190,21 @@ function createClassicLeds(){
}
}
function createLeftLeds(){
var steph = (ptblh - pttlh)/ledsleft;
var stepv = (ptblv - pttlv - (2*edgeVGap))/ledsleft;
for (var i = ledsleft-1; i>-1; i--){
var hmin = pttlh+(steph*Number([i]));
var hmax = hmin+ledsVDepth;
var vmin = ovl("-",pttlv+(stepv*Number([i]))+edgeVGap);
var vmax = ovl("+",pttlv+(stepv*Number([i+1]))+edgeVGap);
createLedArray(hmin, hmax, vmin, vmax);
}
}
//rectangle
createTopLeds();
createRightLeds();
createBottomLeds();

View File

@@ -240,6 +240,11 @@ function requestInstanceSwitch(inst)
sendToHyperion("instance","switchTo",'"instance": '+inst);
}
function requestPlatformShutdown()
{
sendToHyperion("platform","poweroff","");
}
function requestServerInfo()
{
sendToHyperion("serverinfo","",'"subscribe":["components-update","sessions-update","priorities-update", "imageToLedMapping-update", "adjustment-update", "videomode-update", "effects-update", "settings-update", "instance-update"]');