From 847b7ef12b55dee3e335c4274a4b2fa57738b44f Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Fri, 13 Jan 2017 20:47:52 +1300 Subject: [PATCH] Cleaned up configuration tab. --- _locales/en/messages.json | 12 +++--- js/fc.js | 1 - js/msp/MSPHelper.js | 4 +- tabs/configuration.html | 31 ++++++---------- tabs/configuration.js | 77 ++++++++++++++++----------------------- tabs/receiver.html | 24 +++++++++--- tabs/receiver.js | 6 ++- 7 files changed, 73 insertions(+), 82 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2885be15..d811ea1f 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -641,12 +641,6 @@ "configurationDisarmKillSwitch": { "message": "Disarm motors regardless of throttle value (When arming via AUX channel)" }, - "configurationMidRc": { - "message": "Center value for RC channels" - }, - "configurationMidRcHelp": { - "message": "This is the center value for all RC channels. Set this to the value that your transmitter sends when the stick is centered for a channel. To adjust the thrust at throttle mid position, change the 'Trottle MID' value on the PID Tuning tab." - }, "configurationDigitalIdlePercent": { "message": "Motor Idle Throttle Value (percent)" }, @@ -979,6 +973,12 @@ "receiverThrottleExpo": { "message": "Throttle EXPO" }, + "receiverMidRc": { + "message": "Center value for RC channels" + }, + "receiverMidRcHelp": { + "message": "This is the center value for all RC channels. Set this to the value that your transmitter sends when the stick is centered for a channel. To adjust the thrust at throttle mid position, change the 'Trottle MID' value on the PID Tuning tab." + }, "receiverDeadband": { "message": "RC Deadband" }, diff --git a/js/fc.js b/js/fc.js index 06990bd9..c56cd626 100644 --- a/js/fc.js +++ b/js/fc.js @@ -185,7 +185,6 @@ var FC = { }; MISC = { - midrc: 0, minthrottle: 0, maxthrottle: 0, mincommand: 0, diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 687a6eb3..a8d21c3c 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -205,7 +205,7 @@ MspHelper.prototype.process_data = function(dataHandler) { } break; case MSPCodes.MSP_MISC: // 22 bytes - MISC.midrc = data.readU16(); + RX_CONFIG.midrc = data.readU16(); MISC.minthrottle = data.readU16(); // 0-2000 MISC.maxthrottle = data.readU16(); // 0-2000 MISC.mincommand = data.readU16(); // 0-2000 @@ -1029,7 +1029,7 @@ MspHelper.prototype.crunch = function(code) { buffer.push16(FC_CONFIG.loopTime); break; case MSPCodes.MSP_SET_MISC: - buffer.push16(MISC.midrc) + buffer.push16(RX_CONFIG.midrc) .push16(MISC.minthrottle) .push16(MISC.maxthrottle) .push16(MISC.mincommand) diff --git a/tabs/configuration.html b/tabs/configuration.html index 16de1cbc..fb1a2f0b 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -82,15 +82,6 @@ -
- -