From b1fa085d64cb3a2851c60e55711a9600850d377d Mon Sep 17 00:00:00 2001 From: brindosch Date: Sun, 25 Aug 2019 16:32:19 +0200 Subject: [PATCH] Breaking Change: ledLayout, ledColorsStream (#614) * Remove clone & index in ledConfig * Additional index correction * Rename ledsConfig maximum and minimum in max and min * Rename ledsConfig hscan and vscan with h and v * Optimize ledColorsStream * tiny correction --- assets/webconfig/js/content_leds.js | 144 +++++----- assets/webconfig/js/ledsim.js | 20 +- assets/webconfig/js/wizard.js | 50 ++-- config/hyperion.config.json.commented | 350 +++++++++++------------- config/hyperion.config.json.default | 338 +++++++++++------------ include/hyperion/Hyperion.h | 3 - include/hyperion/LedString.h | 5 - include/utils/hyperion.h | 130 +++------ libsrc/api/JsonAPI.cpp | 9 +- libsrc/hyperion/Hyperion.cpp | 19 +- libsrc/hyperion/schema/schema-leds.json | 22 +- 11 files changed, 466 insertions(+), 624 deletions(-) diff --git a/assets/webconfig/js/content_leds.js b/assets/webconfig/js/content_leds.js index c032f0e9..88ca8cd9 100644 --- a/assets/webconfig/js/content_leds.js +++ b/assets/webconfig/js/content_leds.js @@ -24,12 +24,12 @@ function createLedPreview(leds, origin){ $('#previewcreator').html($.i18n('conf_leds_layout_preview_originMA')); $('#leds_preview').css("padding-top", "100%"); } - + $('#previewledcount').html($.i18n('conf_leds_layout_preview_totalleds', leds.length)); $('#previewledpower').html($.i18n('conf_leds_layout_preview_ledpower', ((leds.length * 0.06)*1.1).toFixed(1))); - + $('.st_helper').css("border", "8px solid grey"); - + var canvas_height = $('#leds_preview').innerHeight(); var canvas_width = $('#leds_preview').innerWidth(); @@ -39,17 +39,17 @@ function createLedPreview(leds, origin){ var led = leds[idx]; var led_id='ledc_'+[idx]; var bgcolor = "background-color:hsl("+(idx*360/leds.length)+",100%,50%);"; - var pos = "left:"+(led.hscan.minimum * canvas_width)+"px;"+ - "top:"+(led.vscan.minimum * canvas_height)+"px;"+ - "width:"+((led.hscan.maximum-led.hscan.minimum) * (canvas_width-1))+"px;"+ - "height:"+((led.vscan.maximum-led.vscan.minimum) * (canvas_height-1))+"px;"; - leds_html += '
'+led.index+'
'; + var pos = "left:"+(led.h.min * canvas_width)+"px;"+ + "top:"+(led.v.min * canvas_height)+"px;"+ + "width:"+((led.h.max-led.h.min) * (canvas_width-1))+"px;"+ + "height:"+((led.v.max-led.v.min) * (canvas_height-1))+"px;"; + leds_html += '
'+idx+'
'; } $('#leds_preview').html(leds_html); $('#ledc_0').css({"background-color":"black","z-index":"12"}); $('#ledc_1').css({"background-color":"grey","z-index":"11"}); $('#ledc_2').css({"background-color":"#A9A9A9","z-index":"10"}); - + if($('#leds_prev_toggle_num').hasClass('btn-success')) $('.led_prev_num').css("display", "inline"); @@ -65,14 +65,14 @@ function createClassicLeds(){ var ledsgpos = parseInt($("#ip_cl_gpos").val()); var position = parseInt($("#ip_cl_position").val()); var reverse = $("#ip_cl_reverse").is(":checked"); - + //advanced values var ledsVDepth = parseInt($("#ip_cl_vdepth").val())/100; var ledsHDepth = parseInt($("#ip_cl_hdepth").val())/100; var edgeVGap = parseInt($("#ip_cl_edgegap").val())/100/2; //var cornerVGap = parseInt($("#ip_cl_cornergap").val())/100/2; var overlap = $("#ip_cl_overlap").val()/4000; - + //helper var edgeHGap = edgeVGap/(16/9); //var cornerHGap = cornerVGap/(16/9); @@ -83,15 +83,15 @@ function createClassicLeds(){ var Hdiff = Hmax-Hmin; var Vdiff = Vmax-Vmin; var ledArray = []; - + function createFinalArray(array){ finalLedArray = []; for(var i = 0; i 1) @@ -120,7 +120,7 @@ function createClassicLeds(){ return 0; return val; } - + function ovl(scan,val) { if(scan == "+") @@ -128,15 +128,15 @@ function createClassicLeds(){ else return valScan(val -= overlap); } - + function createLedArray(hmin, hmax, vmin, vmax){ hmin = round(hmin); hmax = round(hmax); vmin = round(vmin); vmax = round(vmax); - ledArray.push( { "hscan" : { "minimum" : hmin, "maximum" : hmax }, "vscan": { "minimum": vmin, "maximum": vmax }} ); + ledArray.push( { "h" : { "min" : hmin, "max" : hmax }, "v": { "min": vmin, "max": vmax }} ); } - + function createTopLeds(){ var step=(Hmax-Hmin)/ledstop; //if(cornerVGap != '0') @@ -148,9 +148,9 @@ function createClassicLeds(){ var hmin = ovl("-",(Hdiff/ledstop*Number([i]))+edgeHGap); var hmax = ovl("+",(Hdiff/ledstop*Number([i]))+step+edgeHGap); createLedArray(hmin, hmax, vmin, vmax); - } + } } - + function createLeftLeds(){ var step=(Vmax-Vmin)/ledsleft; //if(cornerVGap != '0') @@ -164,7 +164,7 @@ function createClassicLeds(){ createLedArray(hmin, hmax, vmin, vmax); } } - + function createRightLeds(){ var step=(Vmax-Vmin)/ledsright; //if(cornerVGap != '0') @@ -175,15 +175,15 @@ function createClassicLeds(){ for (var i = 0; i-1; i--){ @@ -192,7 +192,7 @@ function createClassicLeds(){ createLedArray(hmin, hmax, vmin, vmax); } } - + createTopLeds(); createRightLeds(); createBottomLeds(); @@ -205,25 +205,25 @@ function createClassicLeds(){ $('#ip_cl_ledsgpos').val(mpos); ledsgpos = mpos; } - + //check led gap length if(ledsglength >= ledArray.length) { $('#ip_cl_ledsglength').val(ledArray.length-1); ledsglength = ledArray.length-ledsglength-1; } - + if(ledsglength != 0){ ledArray.splice(ledsgpos, ledsglength); } - + if (position != 0){ rotateArray(ledArray, position); } if (reverse) ledArray.reverse(); - + createFinalArray(ledArray); } @@ -239,7 +239,6 @@ function createMatrixLeds(){ var start = $("#ip_ma_start").val(); var parallel = false - var index = 0 var leds = [] var hblock = 1.0 / ledshoriz var vblock = 1.0 / ledsvert @@ -250,11 +249,10 @@ function createMatrixLeds(){ /** * Adds led to the hyperion config led array - * @param {Number} index Index of the led * @param {Number} x Horizontal position in matrix * @param {Number} y Vertical position in matrix */ - function addLed (index, x, y) { + function addLed (x, y) { var hscanMin = x * hblock var hscanMax = (x + 1) * hblock var vscanMin = y * vblock @@ -264,16 +262,15 @@ function createMatrixLeds(){ hscanMax = round(hscanMax); vscanMin = round(vscanMin); vscanMax = round(vscanMax); - + leds.push({ - index: index, - hscan: { - minimum: hscanMin, - maximum: hscanMax + h: { + min: hscanMin, + max: hscanMax }, - vscan: { - minimum: vscanMin, - maximum: vscanMax + v: { + min: vscanMin, + max: vscanMax } }) } @@ -291,8 +288,7 @@ function createMatrixLeds(){ 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(index, x, y) - index++ + addLed(x, y) } if (!parallel) { forward = !forward @@ -309,7 +305,7 @@ function createMatrixLeds(){ $(document).ready(function() { // translate performTranslation(); - + //add intros if(window.showOptHelp) { @@ -317,9 +313,9 @@ $(document).ready(function() { createHintH("intro", $.i18n('conf_leds_layout_intro'), "layout_intro"); $('#led_vis_help').html('
'+$.i18n('conf_leds_layout_preview_l1')+'
'+$.i18n('conf_leds_layout_preview_l2')+'
'); } - + var slConfig = window.serverConfig.ledConfig; - + //restore ledConfig for(var key in slConfig) { @@ -343,7 +339,7 @@ $(document).ready(function() { } setTimeout(requestWriteConfig, 100, {ledConfig}); } - + // check access level and adjust ui if(storedAccess == "default") { @@ -357,10 +353,10 @@ $(document).ready(function() { $('#btn_ma_save').toggle(false); $('#btn_cl_save').toggle(false); } - + //Wiki link $('#leds_wl').append('

'+$.i18n('general_wiki_moreto',$.i18n('conf_leds_nav_label_ledlayout'))+buildWL("user/moretopics/ledarea","Wiki")+'

'); - + // bind change event to all inputs $('.ledCLconstr').bind("change", function() { valValue(this.id,this.value,this.min,this.max); @@ -373,7 +369,7 @@ $(document).ready(function() { }); // v4 of json schema with diff required assignment - remove when hyperion schema moved to v4 - var ledschema = {"items":{"additionalProperties":false,"required":["hscan","vscan","index"],"properties":{"clone":{"type":"integer"},"colorOrder":{"enum":["rgb","bgr","rbg","brg","gbr","grb"],"type":"string"},"hscan":{"additionalProperties":false,"properties":{"maximum":{"maximum":1,"minimum":0,"type":"number"},"minimum":{"maximum":1,"minimum":0,"type":"number"}},"type":"object"},"index":{"type":"integer"},"vscan":{"additionalProperties":false,"properties":{"maximum":{"maximum":1,"minimum":0,"type":"number"},"minimum":{"maximum":1,"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"type":"array"}; + var ledschema = {"items":{"additionalProperties":false,"required":["h","v"],"properties":{"colorOrder":{"enum":["rgb","bgr","rbg","brg","gbr","grb"],"type":"string"},"h":{"additionalProperties":false,"properties":{"max":{"maximum":1,"minimum":0,"type":"number"},"min":{"maximum":1,"minimum":0,"type":"number"}},"type":"object"},"v":{"additionalProperties":false,"properties":{"max":{"maximum":1,"minimum":0,"type":"number"},"min":{"maximum":1,"minimum":0,"type":"number"}},"type":"object"}},"type":"object"},"type":"array"}; //create jsonace editor var aceEdt = new JSONACEEditor(document.getElementById("aceedit"),{ mode: 'code', @@ -387,7 +383,7 @@ $(document).ready(function() { { success = false; } - + if(success) { $('#leds_custom_updsim').attr("disabled", false); @@ -400,7 +396,7 @@ $(document).ready(function() { } } }, window.serverConfig.leds); - + //TODO: HACK! No callback for schema validation - Add it! setInterval(function(){ if($('#aceedit table').hasClass('jsoneditor-text-errors')) @@ -409,23 +405,23 @@ $(document).ready(function() { $('#leds_custom_save').attr("disabled", true); } },1000); - + $('.jsoneditor-menu').toggle(); - + // leds to finalLedArray finalLedArray = window.serverConfig.leds; - + // cl/ma leds push to textfield $('#btn_cl_generate, #btn_ma_generate').off().on("click", function(e) { if(e.currentTarget.id == "btn_cl_generate") $('#collapse1').collapse('hide'); else $('#collapse2').collapse('hide'); - + aceEdt.set(finalLedArray); $('#collapse4').collapse('show'); }); - + // create and update editor $("#leddevices").off().on("change", function() { var generalOptions = window.serverSchema.properties.device; @@ -437,7 +433,7 @@ $(document).ready(function() { generalOptions : generalOptions, specificOptions : specificOptions, }); - + var values_general = {}; var values_specific = {}; var isCurrentDevice = (window.serverInfo.ledDevices.active == $(this).val()); @@ -457,10 +453,10 @@ $(document).ready(function() { conf_editor.getEditor("root.specificOptions").setValue( values_specific ); }; - + // change save button state based on validation result conf_editor.validate().length ? $('#btn_submit_controller').attr('disabled', true) : $('#btn_submit_controller').attr('disabled', false); - + // led controller sepecific wizards if($(this).val() == "philipshue") { @@ -473,7 +469,7 @@ $(document).ready(function() { $('#btn_led_device_wiz').off(); } }); - + // create led device selection var ledDevices = window.serverInfo.ledDevices.available; var devRPiSPI = ['apa102', 'apa104', 'ws2801', 'lpd6803', 'lpd8806', 'p9813', 'sk6812spi', 'sk6822spi', 'ws2812spi']; @@ -481,14 +477,14 @@ $(document).ready(function() { var devRPiGPIO = ['piblaster']; var devNET = ['atmoorb', 'fadecandy', 'philipshue', 'nanoleaf', 'tinkerforge', 'tpm2net', 'udpe131', 'udpartnet', 'udph801', 'udpraw']; var devUSB = ['adalight', 'dmx', 'atmo', 'hyperionusbasp', 'lightpack', 'multilightpack', 'paintpack', 'rawhid', 'sedu', 'tpm2', 'karate']; - + var optArr = [[]]; optArr[1]=[]; optArr[2]=[]; optArr[3]=[]; optArr[4]=[]; optArr[5]=[]; - + for (var idx=0; idx= maxLedId ) + + const QJsonObject& hscanConfig = ledConfigArray[i].toObject()["h"].toObject(); + const QJsonObject& vscanConfig = ledConfigArray[i].toObject()["v"].toObject(); + led.minX_frac = qMax(0.0, qMin(1.0, hscanConfig["min"].toDouble())); + led.maxX_frac = qMax(0.0, qMin(1.0, hscanConfig["max"].toDouble())); + led.minY_frac = qMax(0.0, qMin(1.0, vscanConfig["min"].toDouble())); + led.maxY_frac = qMax(0.0, qMin(1.0, vscanConfig["max"].toDouble())); + // Fix if the user swapped min and max + if (led.minX_frac > led.maxX_frac) { - //Warning(_log, "LED %d: clone index of %d is out of range, clone ignored", led.index, led.clone); - led.clone = -1; + std::swap(led.minX_frac, led.maxX_frac); + } + if (led.minY_frac > led.maxY_frac) + { + std::swap(led.minY_frac, led.maxY_frac); } - if ( led.clone < 0 ) - { - const QJsonObject& hscanConfig = ledConfigArray[i].toObject()["hscan"].toObject(); - const QJsonObject& vscanConfig = ledConfigArray[i].toObject()["vscan"].toObject(); - led.minX_frac = qMax(0.0, qMin(1.0, hscanConfig["minimum"].toDouble())); - led.maxX_frac = qMax(0.0, qMin(1.0, hscanConfig["maximum"].toDouble())); - led.minY_frac = qMax(0.0, qMin(1.0, vscanConfig["minimum"].toDouble())); - led.maxY_frac = qMax(0.0, qMin(1.0, vscanConfig["maximum"].toDouble())); - // Fix if the user swapped min and max - if (led.minX_frac > led.maxX_frac) - { - std::swap(led.minX_frac, led.maxX_frac); - } - if (led.minY_frac > led.maxY_frac) - { - std::swap(led.minY_frac, led.maxY_frac); - } - - // Get the order of the rgb channels for this led (default is device order) - led.colorOrder = stringToColorOrder(index["colorOrder"].toString(deviceOrderStr)); - ledString.leds().push_back(led); - } + // Get the order of the rgb channels for this led (default is device order) + led.colorOrder = stringToColorOrder(index["colorOrder"].toString(deviceOrderStr)); + ledString.leds().push_back(led); } - - // Make sure the leds are sorted (on their indices) - std::sort(ledString.leds().begin(), ledString.leds().end(), [](const Led& lhs, const Led& rhs){ return lhs.index < rhs.index; }); - return ledString; - } - - LedString createLedStringClone(const QJsonArray& ledConfigArray, const ColorOrder deviceOrder) - { - LedString ledString; - const QString deviceOrderStr = colorOrderToString(deviceOrder); - int maxLedId = ledConfigArray.size(); - - for (signed i = 0; i < ledConfigArray.size(); ++i) - { - const QJsonObject& index = ledConfigArray[i].toObject(); - - Led led; - led.index = index["index"].toInt(); - led.clone = index["clone"].toInt(-1); - if ( led.clone < -1 || led.clone >= maxLedId ) - { - //Warning(_log, "LED %d: clone index of %d is out of range, clone ignored", led.index, led.clone); - led.clone = -1; - } - - if ( led.clone >= 0 ) - { - //Debug(_log, "LED %d: clone from led %d", led.index, led.clone); - led.minX_frac = 0; - led.maxX_frac = 0; - led.minY_frac = 0; - led.maxY_frac = 0; - // Get the order of the rgb channels for this led (default is device order) - led.colorOrder = stringToColorOrder(index["colorOrder"].toString(deviceOrderStr)); - - ledString.leds().push_back(led); - } - - } - - // Make sure the leds are sorted (on their indices) - std::sort(ledString.leds().begin(), ledString.leds().end(), [](const Led& lhs, const Led& rhs){ return lhs.index < rhs.index; }); return ledString; } @@ -282,30 +228,26 @@ namespace hyperion { for (signed i = 0; i < ledConfigArray.size(); ++i) { - const QJsonObject& index = ledConfigArray[i].toObject(); - - if (index["clone"].toInt(-1) < 0 ) + const QJsonObject& hscanConfig = ledConfigArray[i].toObject()["h"].toObject(); + const QJsonObject& vscanConfig = ledConfigArray[i].toObject()["v"].toObject(); + double minX_frac = qMax(0.0, qMin(1.0, hscanConfig["min"].toDouble())); + double maxX_frac = qMax(0.0, qMin(1.0, hscanConfig["max"].toDouble())); + double minY_frac = qMax(0.0, qMin(1.0, vscanConfig["min"].toDouble())); + double maxY_frac = qMax(0.0, qMin(1.0, vscanConfig["max"].toDouble())); + // Fix if the user swapped min and max + if (minX_frac > maxX_frac) { - const QJsonObject& hscanConfig = ledConfigArray[i].toObject()["hscan"].toObject(); - const QJsonObject& vscanConfig = ledConfigArray[i].toObject()["vscan"].toObject(); - double minX_frac = qMax(0.0, qMin(1.0, hscanConfig["minimum"].toDouble())); - double maxX_frac = qMax(0.0, qMin(1.0, hscanConfig["maximum"].toDouble())); - double minY_frac = qMax(0.0, qMin(1.0, vscanConfig["minimum"].toDouble())); - double maxY_frac = qMax(0.0, qMin(1.0, vscanConfig["maximum"].toDouble())); - // Fix if the user swapped min and max - if (minX_frac > maxX_frac) - { - std::swap(minX_frac, maxX_frac); - } - if (minY_frac > maxY_frac) - { - std::swap(minY_frac, maxY_frac); - } - - // calculate mid point and make grid calculation - midPointsX.push_back( int(1000.0*(minX_frac + maxX_frac) / 2.0) ); - midPointsY.push_back( int(1000.0*(minY_frac + maxY_frac) / 2.0) ); + std::swap(minX_frac, maxX_frac); } + if (minY_frac > maxY_frac) + { + std::swap(minY_frac, maxY_frac); + } + + // calculate mid point and make grid calculation + midPointsX.push_back( int(1000.0*(minX_frac + maxX_frac) / 2.0) ); + midPointsY.push_back( int(1000.0*(minY_frac + maxY_frac) / 2.0) ); + } // remove duplicates @@ -315,7 +257,7 @@ namespace hyperion { midPointsY.erase(std::unique(midPointsY.begin(), midPointsY.end()), midPointsY.end()); QSize gridSize( midPointsX.size(), midPointsY.size() ); - //Debug(_log, "led layout grid: %dx%d", gridSize.width(), gridSize.height()); + //Debug(_log, "LED layout grid size: %dx%d", gridSize.width(), gridSize.height()); return gridSize; } diff --git a/libsrc/api/JsonAPI.cpp b/libsrc/api/JsonAPI.cpp index 83127145..66395dc9 100644 --- a/libsrc/api/JsonAPI.cpp +++ b/libsrc/api/JsonAPI.cpp @@ -1464,14 +1464,9 @@ void JsonAPI::streamLedcolorsUpdate(const std::vector& ledColors) QJsonObject result; QJsonArray leds; - for(auto color = ledColors.begin(); color != ledColors.end(); ++color) + for(const auto & color : ledColors) { - QJsonObject item; - item["index"] = int(color - ledColors.begin()); - item["red"] = color->red; - item["green"] = color->green; - item["blue"] = color->blue; - leds.append(item); + leds << QJsonValue(color.red) << QJsonValue(color.green) << QJsonValue(color.blue); } result["leds"] = leds; diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 3995cb2f..f91b8e60 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -46,7 +46,6 @@ Hyperion::Hyperion(const quint8& instance) , _settingsManager(new SettingsManager(instance, this)) , _componentRegister(this) , _ledString(hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object()))) - , _ledStringClone(hyperion::createLedStringClone(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object()))) , _imageProcessor(new ImageProcessor(_ledString, this)) , _muxer(_ledString.leds().size()) , _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object())) @@ -87,10 +86,6 @@ void Hyperion::start() { _ledStringColorOrder.push_back(led.colorOrder); } - for (Led& led : _ledStringClone.leds()) - { - _ledStringColorOrder.insert(_ledStringColorOrder.begin() + led.index, led.colorOrder); - } // connect Hyperion::update with Muxer visible priority changes as muxer updates independent connect(&_muxer, &PriorityMuxer::visiblePriorityChanged, this, &Hyperion::update); @@ -202,9 +197,8 @@ void Hyperion::handleSettingsUpdate(const settings::type& type, const QJsonDocum // stop and cache all running effects, as effects depend heavily on ledlayout _effectEngine->cacheRunningEffects(); - // ledstring, clone, img processor, muxer, ledGridSize (eff engine image based effects), _ledBuffer and ByteOrder of ledstring + // ledstring, img processor, muxer, ledGridSize (eff engine image based effects), _ledBuffer and ByteOrder of ledstring _ledString = hyperion::createLedString(leds, hyperion::createColorOrder(getSetting(settings::DEVICE).object())); - _ledStringClone = hyperion::createLedStringClone(leds, hyperion::createColorOrder(getSetting(settings::DEVICE).object())); _imageProcessor->setLedString(_ledString); _muxer.updateLedColorsLength(_ledString.leds().size()); _ledGridSize = hyperion::getLedLayoutGridSize(leds); @@ -217,10 +211,6 @@ void Hyperion::handleSettingsUpdate(const settings::type& type, const QJsonDocum { _ledStringColorOrder.push_back(led.colorOrder); } - for (Led& led : _ledStringClone.leds()) - { - _ledStringColorOrder.insert(_ledStringColorOrder.begin() + led.index, led.colorOrder); - } // handle hwLedCount update _hwLedCount = qMax(unsigned(getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount())), getLedCount()); @@ -244,7 +234,6 @@ void Hyperion::handleSettingsUpdate(const settings::type& type, const QJsonDocum if(_ledDeviceWrapper->getColorOrder() != dev["colorOrder"].toString("rgb")) { _ledString = hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(dev)); - _ledStringClone = hyperion::createLedStringClone(getSetting(settings::LEDS).array(), hyperion::createColorOrder(dev)); _imageProcessor->setLedString(_ledString); } @@ -542,12 +531,6 @@ void Hyperion::update() _raw2ledAdjustment->applyAdjustment(_ledBuffer); - // insert cloned leds into buffer - for (Led& led : _ledStringClone.leds()) - { - _ledBuffer.insert(_ledBuffer.begin() + led.index, _ledBuffer.at(led.clone)); - } - int i = 0; for (ColorRgb& color : _ledBuffer) { diff --git a/libsrc/hyperion/schema/schema-leds.json b/libsrc/hyperion/schema/schema-leds.json index c4557e74..c2f23f94 100644 --- a/libsrc/hyperion/schema/schema-leds.json +++ b/libsrc/hyperion/schema/schema-leds.json @@ -8,23 +8,13 @@ "required" : true, "properties": { - "index": - { - "type":"integer", - "required":true, - "default" : 0 - }, - "clone": - { - "type":"integer" - }, - "hscan": + "h": { "type":"object", "required" : true, "properties": { - "minimum": + "min": { "type":"number", "minimum" : 0, @@ -32,7 +22,7 @@ "required":true, "default" : 0 }, - "maximum": + "max": { "type":"number", "minimum" : 0, @@ -43,13 +33,13 @@ }, "additionalProperties" : false }, - "vscan": + "v": { "type":"object", "required" : true, "properties": { - "minimum": + "min": { "type":"number", "minimum" : 0, @@ -57,7 +47,7 @@ "required":true, "default" : 0 }, - "maximum": + "max": { "type":"number", "minimum" : 0,