From 9025430bee3a46c428d0f4d62df730237e46e446 Mon Sep 17 00:00:00 2001 From: Sean M Date: Thu, 9 Aug 2018 22:47:29 -0400 Subject: [PATCH] Updating UI for interpolation / fixing alignment --- locales/en/messages.json | 3 +++ src/css/tabs/receiver.css | 4 ++++ src/js/msp/MSPHelper.js | 14 +++++++++--- src/js/tabs/receiver.js | 10 +++++++- src/tabs/receiver.html | 48 +++++---------------------------------- 5 files changed, 33 insertions(+), 46 deletions(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index cd524e25..98c558fe 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1333,6 +1333,9 @@ "receiverRcInterpolationOff": { "message": "Off" }, + "receiverRcSmoothingType": { + "message": "Smoothing Type" + }, "receiverRcInterpolationDefault": { "message": "Preset" }, diff --git a/src/css/tabs/receiver.css b/src/css/tabs/receiver.css index 1ef407be..f59c8073 100644 --- a/src/css/tabs/receiver.css +++ b/src/css/tabs/receiver.css @@ -410,6 +410,10 @@ margin-right: 10px; } +.tab-receiver .rcInterpolation-label { + border-right: none; +} + .tab-receiver .throttle_curve { margin: 0 0px 0px 0; width: 200px; diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js index bf51b42e..31f24533 100644 --- a/src/js/msp/MSPHelper.js +++ b/src/js/msp/MSPHelper.js @@ -764,9 +764,6 @@ MspHelper.prototype.process_data = function(dataHandler) { RX_CONFIG.spektrum_sat_bind = data.readU8(); RX_CONFIG.rx_min_usec = data.readU16(); RX_CONFIG.rx_max_usec = data.readU16(); - RX_CONFIG.rcInterpolation = 0; - RX_CONFIG.rcInterpolationInterval = 0; - RX_CONFIG.airModeActivateThreshold = 0; if (semver.gte(CONFIG.apiVersion, "1.20.0")) { RX_CONFIG.rcInterpolation = data.readU8(); RX_CONFIG.rcInterpolationInterval = data.readU8(); @@ -784,8 +781,19 @@ MspHelper.prototype.process_data = function(dataHandler) { RX_CONFIG.rcSmoothingInputType = data.readU8(); RX_CONFIG.rcSmoothingDerivativeType = data.readU8(); } + } else { + RX_CONFIG.rxSpiProtocol = 0; + RX_CONFIG.rxSpiId = 0; + RX_CONFIG.rxSpiRfChannelCount = 0; + RX_CONFIG.fpvCamAngleDegrees = 0; } + } else { + RX_CONFIG.rcInterpolation = 0; + RX_CONFIG.rcInterpolationInterval = 0; + RX_CONFIG.airModeActivateThreshold = 0; } + + break; case MSPCodes.MSP_FAILSAFE_CONFIG: diff --git a/src/js/tabs/receiver.js b/src/js/tabs/receiver.js index 467f8be7..1b08bf90 100644 --- a/src/js/tabs/receiver.js +++ b/src/js/tabs/receiver.js @@ -325,7 +325,6 @@ TABS.receiver.initialize = function (callback) { }); // RC Smoothing - $('.tab-receiver .rcSmoothing').hide(); if (semver.gte(CONFIG.apiVersion, "1.40.0")) { $('.tab-receiver .rcSmoothing').show(); @@ -403,6 +402,15 @@ TABS.receiver.initialize = function (callback) { rc_smoothing_input_type.val(RX_CONFIG.rcSmoothingInputType); updateInterpolationView(); + } else { + $('.tab-receiver .rcInterpolation').show(); + $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); + $('.tab-receiver .rcSmoothing-input-cutoff').hide(); + $('.tab-receiver .rcSmoothing-derivative-type').hide(); + $('.tab-receiver .rcSmoothing-input-type').hide(); + $('.tab-receiver .rcSmoothing-derivative-manual').hide(); + $('.tab-receiver .rcSmoothing-input-manual').hide(); + $('.tab-receiver .rc-smoothing-type').hide(); } // Only show the MSP control sticks if the MSP Rx feature is enabled diff --git a/src/tabs/receiver.html b/src/tabs/receiver.html index 2b557772..eee11f75 100644 --- a/src/tabs/receiver.html +++ b/src/tabs/receiver.html @@ -78,42 +78,6 @@ -
@@ -129,7 +93,7 @@ @@ -173,8 +137,8 @@ - - + - - +
+
+
-