From 553bde1b37d2f93b233b79c829c46f950ba47315 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:58:01 +0200 Subject: [PATCH] Layout in place, now I need the msp messages to laod and save overrides --- _locales/en/messages.json | 3 +++ tabs/mixer.html | 28 ++++++++++++++++++++++++++++ tabs/mixer.js | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ff1bb554..b10ac194 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -5474,5 +5474,8 @@ }, "targetPrefetchFailNoPort": { "message": "Cannot prefetch target: No port" + }, + "timerOutputs": { + "message": "Timer outputs" } } diff --git a/tabs/mixer.html b/tabs/mixer.html index fb3c6fa9..d690f200 100644 --- a/tabs/mixer.html +++ b/tabs/mixer.html @@ -28,6 +28,34 @@ + +
+
+
+
+
+ +
+
+
diff --git a/tabs/mixer.js b/tabs/mixer.js index f2d4559e..222ff5f3 100644 --- a/tabs/mixer.js +++ b/tabs/mixer.js @@ -82,6 +82,38 @@ TABS.mixer.initialize = function (callback, scrollPosition) { } + function renderTimerOverride() { + let outputCount = OUTPUT_MAPPING.getOutputCount(), + $container = $('#timerOutputsList'), timers = {}; + + + for(let i = 0; i < outputCount; ++i) { + let timer = OUTPUT_MAPPING.getTimerId(i); + + timers[timer] = true; + console.log("timer: " + i + " " + timer); + } + + let usedTimers = Object.keys(timers).sort((a,b) => a-b); + + for (t of usedTimers) { + console.log("timer settings: " + t); + $container.append( + '
' + + '' + + '' + + '
' + ); + } + + } + function renderOutputMapping() { let outputMap = OUTPUT_MAPPING.getOutputTable( MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER, @@ -704,6 +736,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { renderOutputTable(); renderOutputMapping(); + renderTimerOverride(); LOGIC_CONDITIONS.init($('#logic-wrapper'));