Various Cleanups (#1075)

* LedDevice - Address clang findings

* Fix Windows Warnings

* Ensure newInput is initialised

* Clean-up unused elements for Plaform Capture

* Fix initialization problem and spellings

* Address clang findings and spelling corrections

* LedDevice clean-ups

* Cleanups

* Align that getLedCount is int

* Have "display" as default for Grabbers

* Fix config during start-up for missing elements

* Framegrabber Clean-up - Remove non supported grabbers from selection, filter valid options

* Typo

* Framegrabber.json - Fix property numbering

* Preselect active Grabbertype

* Sort Grabbernames

* Align options with selected element

* Fix deletion of pointer to incomplete type 'BonjourBrowserWrapper'

* Address macOS compile warnings

* Have default layout = 1 LED only to avoid errors as in #673

* Address lgtm findings

* Address finding that params passed to LedDevice discovery were not considered

* Cleanups after merging with latest master

* Update Changelog

* Address lgtm findings

* Fix comment

* Test Fix

* Fix Python Warning

* Handle Dummy Device assignment correctly

* Address delete called on non-final 'commandline::Option' that has virtual functions but non-virtual destructor

* Correct that QTimer.start accepts only int

* Have Release Python GIL & reset threat state chnage downward compatible

* Correct format specifier

* LedDevice - add assertions

* Readonly DB - Fix merge issue

* Smoothing - Fix wrong defaults

* LedDevice - correct assertion

* Show smoothing config set# in debug and related values.

* Suppress error on windows, if default file is "/dev/null"

* CMAKE - Allow to define QT_BASE_DIR dynamically via environment-variable

* Ignore Visual Studio specific files

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2020-11-14 17:58:56 +01:00
committed by GitHub
parent d28540a7fe
commit efc2046ab5
93 changed files with 1140 additions and 1172 deletions

View File

@@ -50,7 +50,7 @@
<label class="ltdlabel" for="ip_cl_top" data-i18n="conf_leds_layout_cl_top">Top</label>
</td>
<td class="itd input-group">
<input class="form-control ledCLconstr " id="ip_cl_top" type="number" value="10" min="0" step="1"></input>
<input class="form-control ledCLconstr " id="ip_cl_top" type="number" value="1" min="0" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>
@@ -59,7 +59,7 @@
<label class="ltdlabel" for="ip_cl_bottom" data-i18n="conf_leds_layout_cl_bottom">Bottom</label>
</td>
<td class="itd input-group">
<input class="form-control ledCLconstr" id="ip_cl_bottom" type="number" value="10" min="0" step="1"></input>
<input class="form-control ledCLconstr" id="ip_cl_bottom" type="number" value="0" min="0" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>
@@ -68,7 +68,7 @@
<label class="ltdlabel" for="ip_cl_left" data-i18n="conf_leds_layout_cl_left">Left</label>
</td>
<td class="itd input-group">
<input class="form-control ledCLconstr" id="ip_cl_left" type="number" value="6" min="0" step="1"></input>
<input class="form-control ledCLconstr" id="ip_cl_left" type="number" value="0" min="0" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>
@@ -77,7 +77,7 @@
<label class="ltdlabel" for="ip_cl_right" data-i18n="conf_leds_layout_cl_right">Right</label>
</td>
<td class="itd input-group">
<input class="form-control ledCLconstr" id="ip_cl_right" type="number" value="6" min="0" step="1"></input>
<input class="form-control ledCLconstr" id="ip_cl_right" type="number" value="0" min="0" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>
@@ -266,7 +266,7 @@
<label class="ltdlabel" for="ip_ma_ledshoriz" data-i18n="conf_leds_layout_ma_horiz">Horizontal</label>
</td>
<td class="itd input-group">
<input class="form-control ledMAconstr" id="ip_ma_ledshoriz" type="number" value="10" min="1" step="1"></input>
<input class="form-control ledMAconstr" id="ip_ma_ledshoriz" type="number" value="1" min="1" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>
@@ -275,7 +275,7 @@
<label class="ltdlabel" for="ip_ma_ledsvert" data-i18n="conf_leds_layout_ma_vert">Vertical</label>
</td>
<td class="itd input-group">
<input class="form-control ledMAconstr" id="ip_ma_ledsvert" type="number" value="10" min="1" step="1"></input>
<input class="form-control ledMAconstr" id="ip_ma_ledsvert" type="number" value="1" min="1" step="1"></input>
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
</td>
</tr>

View File

@@ -237,11 +237,11 @@ $(document).ready(function () {
}
}
if (window.serverInfo.grabbers.active)
{
if (window.serverInfo.grabbers.active)
{
var activegrabber = window.serverInfo.grabbers.active.toLowerCase();
$("#" + selector + " option[value='" + activegrabber + "']").attr('selected', 'selected');
}
}
var selectedType = $("#root_framegrabber_type").val();
filerFgGrabberOptions(selectedType);

View File

@@ -359,10 +359,10 @@ function migrateLedConfig(slConfig){
//Default Classic layout
newLedConfig.classic = {
"top" : 8,
"bottom" : 8,
"left" : 5,
"right" : 5,
"top" : 1,
"bottom" : 0,
"left" : 0,
"right" : 0,
"glength" : 0,
"gpos" : 0,
"position" : 0,
@@ -386,8 +386,8 @@ function migrateLedConfig(slConfig){
newLedConfig.classic.overlap = slConfig.overlap;
//Default Matrix layout
newLedConfig["matrix"] = { "ledshoriz": 10,
"ledsvert" : 10,
newLedConfig["matrix"] = { "ledshoriz": 1,
"ledsvert" : 1,
"cabling" : "snake",
"start" : "top-left"
}

View File

@@ -454,9 +454,9 @@ function requestAdjustment(type, value, complete)
sendToHyperion("adjustment", "", '"adjustment": {"'+type+'": '+value+'}');
}
async function requestLedDeviceDiscovery(type)
async function requestLedDeviceDiscovery(type, params)
{
let data = { ledDeviceType: type };
let data = { ledDeviceType: type, params: params };
return sendAsyncToHyperion("leddevice", "discover", data, Math.floor(Math.random() * 1000) );
}

View File

@@ -389,7 +389,7 @@ function showInfoDialog(type,header,message)
$(document).on('click', '[data-dismiss-modal]', function () {
var target = $(this).attr('data-dismiss-modal');
$(target).modal('hide');
$.find(target).modal.hide();
});
}

View File

@@ -424,7 +424,7 @@ function startWizardCC() {
}
//create html
$('#wiz_header').html('<i class="fa fa-magic fa-fw"></i>' + $.i18n('wiz_cc_title'));
$('#wizp1_body').html('<h4 style="font-weight:bold;text-transform:uppercase;">' + $.i18n('wiz_cc_title') + '</h4><p>' + $.i18n('wiz_cc_intro1') + '</p><label>' + $.i18n('wiz_cc_kwebs') + '</label><input class="form-control" style="width:170px;margin:auto" id="wiz_cc_kodiip" type="text" placeholder="' + kodiAddress + '" value="' + kodiAddress + '" /><span id="kodi_status"></span><span id="multi_cali"></span>');
$('#wizp1_body').html('<h4 style="font-weight:bold;text-transform:uppercase;">' + $.i18n('wiz_cc_title') + '</h4><p>' + $.i18n('wiz_cc_intro1') + '</p><label>' + $.i18n('wiz_cc_kwebs') + '</label><input class="form-control" style="width:170px;margin:auto" id="wiz_cc_kodiip" type="text" placeholder="' + kodiAddress + '" value="' + kodiAddress + '" /><span id="kodi_status"></span><span id="multi_cali"></span>');
$('#wizp1_footer').html('<button type="button" class="btn btn-primary" id="btn_wiz_cont" disabled="disabled"><i class="fa fa-fw fa-check"></i>' + $.i18n('general_btn_continue') + '</button><button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-fw fa-close"></i>' + $.i18n('general_btn_cancel') + '</button>');
$('#wizp2_body').html('<div id="wiz_cc_desc" style="font-weight:bold"></div><div id="editor_container_wiz"></div>');
$('#wizp2_footer').html('<button type="button" class="btn btn-primary" id="btn_wiz_back"><i class="fa fa-fw fa-chevron-left"></i>' + $.i18n('general_btn_back') + '</button><button type="button" class="btn btn-primary" id="btn_wiz_next">' + $.i18n('general_btn_next') + '<i style="margin-left:4px;"class="fa fa-fw fa-chevron-right"></i></button><button type="button" class="btn btn-warning" id="btn_wiz_save" style="display:none"><i class="fa fa-fw fa-save"></i>' + $.i18n('general_btn_save') + '</button><button type="button" class="btn btn-danger" id="btn_wiz_abort"><i class="fa fa-fw fa-close"></i>' + $.i18n('general_btn_cancel') + '</button>');
@@ -439,6 +439,8 @@ function startWizardCC() {
$('#wiz_cc_kodiip').off().on('change', function () {
kodiAddress = $(this).val().trim();
$('#wizp1_body').find("kodiAddress").val(kodiAddress);
$('#kodi_status').html('');
// Remove Kodi's default Web-Socket port (9090) from display and ensure Kodi's default REST-API port (8080) is mapped to web-socket port to ease migration
@@ -1585,7 +1587,7 @@ function beginWizardAtmoOrb() {
lights = [];
configuredLights = [];
configruedOrbIds = conf_editor.getEditor("root.specificOptions.orbIds").getValue().trim();
var configruedOrbIds = conf_editor.getEditor("root.specificOptions.orbIds").getValue().trim();
if (configruedOrbIds.length !== 0) {
configuredLights = configruedOrbIds.split(",").map(Number);
}
@@ -1648,13 +1650,16 @@ function beginWizardAtmoOrb() {
async function discover_atmoorb_lights(multiCastGroup, multiCastPort) {
var light = {};
if (multiCastGroup === "")
multiCastGroup = "239.255.255.250";
var params = {};
if (multiCastGroup !== "")
{
params.multiCastGroup = multiCastGroup;
}
if (multiCastPort === "")
multiCastPort = 49692;
let params = { multiCastGroup: multiCastGroup, multiCastPort: multiCastPort };
if (multiCastPort !== 0)
{
params.multiCastPort = multiCastPort;
}
// Get discovered lights
const res = await requestLedDeviceDiscovery('atmoorb', params);