From e65b63cf54799c4cbfe0099e9b6ba1929b4df5ef Mon Sep 17 00:00:00 2001 From: Adrien RENARD Date: Tue, 24 Jun 2025 02:41:23 +0200 Subject: [PATCH] Debug last commit --- main.js | 16 ++++++++-------- presets.js | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index 9e2c2ff..cc79d8c 100644 --- a/main.js +++ b/main.js @@ -86,8 +86,8 @@ class MatrixInstance extends InstanceBase { // OUTPUTS getOutputsList(all) { - var list = OUTPUTS; - if(all) list.push( { id: '0', label: 'All Outputs' } ); + var list = [...OUTPUTS]; + if(all===true) list.push( { id: '0', label: 'All Outputs' } ); return list; } getOutByID(id) { @@ -95,7 +95,7 @@ class MatrixInstance extends InstanceBase { var l = OUTPUTS.length; for(var i=0; i { iptList.forEach((ipt) => { - presets[`xpt_${out.id}_${ipt.id}`] = { type: 'button', category: out.label+" - XPT", @@ -41,8 +42,35 @@ module.exports = { }); }); + // CROSSPOINTS ALL OUTPUTS + iptList.forEach((ipt) => { + presets[`xpt_all_${ipt.id}`] = { + type: 'button', + category: "All Outputs - XPT", + style: { + text: `ALL #${ipt.id}`, + //size: '14', + color: combineRgb(255, 255, 255), + bgcolor: combineRgb(0, 0, 0) + }, + steps: [{ + down: [{ + actionId: 'setCrosspoint', + options: { out: '0', ipt: ipt.id } + }] + }], + feedbacks: [ + { + feedbackId: 'connect_status', + options: {}, + isInverted: true, + style: { color: combineRgb(255, 80, 80), bgcolor: combineRgb(80, 0, 0) } + } + ] + }; + }); + // RECALL PRESETS - var pstList = this.getPresetsList(false); pstList.forEach((pst) => { presets[`recall_pst${pst.id}`] = { type: 'button',