diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 42299e074..b0f092329 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -4262,5 +4262,17 @@ }, "BLACKBOX_FEATURE_MOTORS": { "message": "Motors output" + }, + "axisRoll": { + "message": "Roll" + }, + "axisPitch": { + "message": "Pitch" + }, + "axisYaw": { + "message": "Yaw" + }, + "showAdvancedPIDs": { + "message": "Show advanced PID controllers" } } diff --git a/gulpfile.js b/gulpfile.js index 661b95d6f..992ca9713 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -52,7 +52,7 @@ sources.css = [ './js/libraries/jbox/jBox.css', './node_modules/openlayers/dist/ol.css', './src/css/logic.css', - './src/css/defaults_dialog.css' + './src/css/defaults_dialog.css', ]; sources.js = [ @@ -133,7 +133,7 @@ sources.js = [ './js/waypointCollection.js', './js/waypoint.js', './node_modules/openlayers/dist/ol.js', - './js/libraries/plotly-latest.min.js' + './js/libraries/plotly-latest.min.js', ]; sources.receiverCss = [ diff --git a/js/helpers.js b/js/helpers.js index 25ff1baef..d45a22639 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -57,4 +57,10 @@ function generateFilename(prefix, suffix) { + zeroPad(date.getSeconds(), 2); return filename + '.' + suffix; +} + +function scaleRangeInt(x, srcMin, srcMax, destMin, destMax) { + let a = (destMax - destMin) * (x - srcMin); + let b = srcMax - srcMin; + return Math.round((a / b) + destMin); } \ No newline at end of file diff --git a/main.css b/main.css index 33f54e7de..1c13dbf81 100644 --- a/main.css +++ b/main.css @@ -2274,5 +2274,5 @@ ol li { } .controlProfileHighlightActive { - background-color: #d5ebfe; + background-color: #d5ebfe !important ; } diff --git a/package-lock.json b/package-lock.json index 898533667..935cc5ada 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4272,6 +4272,11 @@ "remove-trailing-separator": "^1.0.1" } }, + "nouislider": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-15.6.0.tgz", + "integrity": "sha512-YJg+A6RQXTuFqhEwd42FeRaEGMGgDSSNnpIyVtT8XJrNl4VBEUkPI6Yj91bT3JjJIvNYi4VdppWeCV+z2gOnnw==" + }, "now-and-later": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", diff --git a/src/css/tabs/pid_tuning.css b/src/css/tabs/pid_tuning.css index 2b00ad870..fb744c920 100644 --- a/src/css/tabs/pid_tuning.css +++ b/src/css/tabs/pid_tuning.css @@ -395,3 +395,54 @@ .settings-table tbody { /* background: #D6D6D6 linear-gradient(-45deg, rgba(255, 255, 255, .2) 10%, transparent 10%, transparent 20%, rgba(255, 255, 255, .2) 20%, rgba(255, 255, 255, .2) 30%, transparent 30%, transparent 40%, rgba(255, 255, 255, .2) 40%, rgba(255, 255, 255, .2) 50%, transparent 50%, transparent 60%, rgba(255, 255, 255, .2) 60%, rgba(255, 255, 255, .2) 70%, transparent 70%, transparent 80%, rgba(255, 255, 255, .2) 80%, rgba(255, 255, 255, .2) 90%, transparent 90%, transparent 100%, rgba(255, 255, 255, .2) 100%, transparent); */ } + +.pid-slider-row { + display: flex; + padding: 4px; +} + +.pid-slider-row span { + margin-right: 2em; + width: 120px; + line-height: 22px;; +} + +.pid-slider-row input[type="number"] { + font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif; + background-color: #fff; + border: 1px solid #ccc; + font-size: 0.95em; + border-radius: 3px; + padding: 0.3em; + margin-right: 2em; +} + +.pid-slider-row input[type="range"] { + display: block; + flex-grow: 100; +} + +.pid-sliders-axis { + padding: 0.5em; + margin-bottom: 1em; +} + +.pid-sliders-axis h3 { + padding: 4px; +} + +.pid-sliders-axis[data-axis="roll"] { + background-color: #afe4fe; +} + +.pid-sliders-axis[data-axis="pitch"] { + background-color: #C4B5FF; +} + +.pid-sliders-axis[data-axis="yaw"] { + background-color: #E6B6F0; +} + +#pid-sliders { + margin-bottom: 1em; +} \ No newline at end of file diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 352ea50a0..cedfe2e3b 100644 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -22,7 +22,99 @@
-
+ +
+
+

+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ +
+

+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ +
+

+
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+
+ +
+ + +
+ +