Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/globalVariablesStatus.js8
-rw-r--r--src/css/tabs/programming.css31
-rw-r--r--tabs/programming.html28
-rw-r--r--tabs/programming.js1
4 files changed, 68 insertions, 0 deletions
diff --git a/js/globalVariablesStatus.js b/js/globalVariablesStatus.js
index 9fa33e30..57abc6c2 100644
--- a/js/globalVariablesStatus.js
+++ b/js/globalVariablesStatus.js
@@ -21,5 +21,13 @@ let GlobalVariablesStatus = function () {
return data;
}
+ self.update = function ($container) {
+ for (let i in self.getAll()) {
+ if (self.getAll().hasOwnProperty(i)) {
+ $container.find("[data-gvar-index=" + i + "]").html(self.get(i));
+ }
+ }
+ }
+
return self;
}; \ No newline at end of file
diff --git a/src/css/tabs/programming.css b/src/css/tabs/programming.css
index e69de29b..504cecee 100644
--- a/src/css/tabs/programming.css
+++ b/src/css/tabs/programming.css
@@ -0,0 +1,31 @@
+.gvar__container {
+ width: 100%;
+ margin: 1em 0 1em 0;
+ padding: 0;
+ position: relative;
+}
+
+.gvar__wrapper {
+ position: relative;
+ float: left;
+ width: 25%;
+ margin: 0;
+ padding: 0;
+}
+
+.gvar__cell {
+ margin: 1em;
+ padding: 1em;
+ background-color: rgb(55, 168, 219);
+}
+
+.gvar__cell h2 {
+ font-size: 1em;
+ color: #eee;
+}
+
+.gvar__value {
+ font-size: 2em;
+ color:#fff;
+ font-weight: bold;
+} \ No newline at end of file
diff --git a/tabs/programming.html b/tabs/programming.html
index 096a0d0a..1480f3ae 100644
--- a/tabs/programming.html
+++ b/tabs/programming.html
@@ -7,6 +7,34 @@
</div>
<div id="logic-wrapper" class="subtab__content subtab__content--current">
+
+ <div class="gvar__container">
+ <div class="gvar__wrapper">
+ <div class="gvar__cell">
+ <h2>GVAR 0</h2>
+ <label class="gvar__value" data-gvar-index="0">0</label>
+ </div>
+ </div>
+ <div class="gvar__wrapper">
+ <div class="gvar__cell">
+ <h2>GVAR 1</h2>
+ <label class="gvar__value" data-gvar-index="1">0</label>
+ </div>
+ </div>
+ <div class="gvar__wrapper">
+ <div class="gvar__cell">
+ <h2>GVAR 2</h2>
+ <label class="gvar__value" data-gvar-index="2">0</label>
+ </div>
+ </div>
+ <div class="gvar__wrapper">
+ <div class="gvar__cell">
+ <h2>GVAR 3</h2>
+ <label class="gvar__value" data-gvar-index="3">0</label>
+ </div>
+ </div>
+ </div>
+
<table class="mixer-table logic__table">
<thead>
<tr>
diff --git a/tabs/programming.js b/tabs/programming.js
index 7db026e9..020c4556 100644
--- a/tabs/programming.js
+++ b/tabs/programming.js
@@ -62,6 +62,7 @@ TABS.programming.initialize = function (callback, scrollPosition) {
function onStatusPullDone() {
LOGIC_CONDITIONS.update(LOGIC_CONDITIONS_STATUS);
+ GLOBAL_VARIABLES_STATUS.update($('.tab-programming'));
}
}