From dc4804c3f1ebb8e4769e54c1809751f303730dbc Mon Sep 17 00:00:00 2001 From: Adrien RENARD Date: Tue, 24 Jun 2025 02:00:45 +0200 Subject: [PATCH] Debug last commit --- companion/manifest.json | 2 +- main.js | 1 - presets.js | 42 +++++++++++++++++++++++++++++++++-------- variables.js | 6 +++--- 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/companion/manifest.json b/companion/manifest.json index 6f1b6f3..63f6d55 100644 --- a/companion/manifest.json +++ b/companion/manifest.json @@ -1,7 +1,7 @@ { "id": "purelink-pt-ma-hd44m", "name": "purelink-pt-ma-hd44m", - "shortname": "PT-MA-HD44M Matrix", + "shortname": "PT-MA-HD44M", "description": "PureLink PT-MA-HD44M Matrix module for Companion", "version": "1.0.0", "license": "MIT", diff --git a/main.js b/main.js index bcf5c1b..49006d6 100644 --- a/main.js +++ b/main.js @@ -352,7 +352,6 @@ class MixerInstance extends InstanceBase { else if(msg.slice(0,7) == "Preset:") { let p = msg.split(' '); let pst = this.getPstByName(p[1]); - console.log(p); // SAVE if(p[2] == "Save") { diff --git a/presets.js b/presets.js index de46236..a08c7c8 100644 --- a/presets.js +++ b/presets.js @@ -13,8 +13,8 @@ module.exports = { type: 'button', category: out.label+" - XPT", style: { - text: `OUT#${out.id} \nIN#${ipt.id}`, - size: '16', + text: `$(PT-MA-HD44M:${out.var_name})\n$(PT-MA-HD44M:${ipt.var_name})`, + //size: '14', color: combineRgb(255, 255, 255), bgcolor: combineRgb(0, 0, 0) }, @@ -48,8 +48,8 @@ module.exports = { type: 'button', category: "Preset - Recall", style: { - text: `Recall \nPST#${pst.id}`, - size: '16', + text: `Recall\n$(PT-MA-HD44M:${pst.var_name})`, + //size: '14', color: combineRgb(24, 76, 119), bgcolor: combineRgb(128, 198, 255) }, @@ -81,8 +81,8 @@ module.exports = { type: 'button', category: "Preset - Save", style: { - text: `Save \nPST#${pst.id}`, - size: '16', + text: `Save\n$(PT-MA-HD44M:${pst.var_name})`, + //size: '14', color: combineRgb(0, 0, 0), bgcolor: combineRgb(249, 177, 21) }, @@ -109,8 +109,8 @@ module.exports = { type: 'button', category: "Preset - Clear", style: { - text: `Clear \nPST#${pst.id}`, - size: '16', + text: `Clear\n$(PT-MA-HD44M:${pst.var_name})`, + //size: '14', color: combineRgb(255, 255, 255), bgcolor: combineRgb(213, 2, 2) }, @@ -130,6 +130,32 @@ module.exports = { ] }; }); + + // REFRESH INFO + presets[`refresh_info`] = { + type: 'button', + category: "Refresh Info", + style: { + text: `Refresh Info`, + size: '14', + color: combineRgb(255, 255, 255), + bgcolor: combineRgb(0, 0, 0) + }, + steps: [{ + down: [{ + actionId: 'refreshInfo', + options: {} + }] + }], + feedbacks: [ + { + feedbackId: 'connect_status', + options: {}, + isInverted: true, + style: { color: combineRgb(255, 80, 80), bgcolor: combineRgb(80, 0, 0) } + } + ] + }; return presets; } diff --git a/variables.js b/variables.js index fef26d8..b844eee 100644 --- a/variables.js +++ b/variables.js @@ -34,15 +34,15 @@ module.exports = { // INPUTS NAMES var list = this.getInputsList(); - list.forEach((i) => { variables[i.var_name] = i.label; }); + list.forEach((i) => { variables[i.var_name] = i.name; }); // OUTPUTS NAMES list = this.getOutputsList(); - list.forEach((i) => { variables[i.var_name] = i.label; }); + list.forEach((i) => { variables[i.var_name] = i.name; }); // PRESETS NAMES list = this.getPresetsList(); - list.forEach((i) => { variables[i.var_name] = i.label; }); + list.forEach((i) => { variables[i.var_name] = i.name; }); // LAST PRESET variables.pst_last = 0;