From a876e4cc651d01fe993f351acc6e8f84dd37e7eb Mon Sep 17 00:00:00 2001 From: Miguel Angel Mulero Martinez Date: Fri, 2 Mar 2018 08:00:15 +0100 Subject: [PATCH] Fix MSP controls --- src/js/tabs/receiver_msp.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/js/tabs/receiver_msp.js b/src/js/tabs/receiver_msp.js index 667ffc70..5dc2f541 100644 --- a/src/js/tabs/receiver_msp.js +++ b/src/js/tabs/receiver_msp.js @@ -7,26 +7,26 @@ var // What's the index of each channel in the MSP channel list? channelMSPIndexes = { - roll: 0, - pitch: 1, - throttle: 2, - yaw: 3, - aux1: 4, - aux2: 5, - aux3: 6, - aux4: 7, + Roll: 0, + Pitch: 1, + Throttle: 2, + Yaw: 3, + Aux1: 4, + Aux2: 5, + Aux3: 6, + Aux4: 7, }, // Set reasonable initial stick positions (Mode 2) stickValues = { - throttle: CHANNEL_MIN_VALUE, - pitch: CHANNEL_MID_VALUE, - roll: CHANNEL_MID_VALUE, - yaw: CHANNEL_MID_VALUE, - aux1: CHANNEL_MIN_VALUE, - aux2: CHANNEL_MIN_VALUE, - aux3: CHANNEL_MIN_VALUE, - aux4: CHANNEL_MIN_VALUE + Throttle: CHANNEL_MIN_VALUE, + Pitch: CHANNEL_MID_VALUE, + Roll: CHANNEL_MID_VALUE, + Yaw: CHANNEL_MID_VALUE, + Aux1: CHANNEL_MIN_VALUE, + Aux2: CHANNEL_MIN_VALUE, + Aux3: CHANNEL_MIN_VALUE, + Aux4: CHANNEL_MIN_VALUE }, // First the vertical axis, then the horizontal: @@ -160,7 +160,7 @@ $(document).ready(function() { $(".slider", sliderElems).each(function(sliderIndex) { var - initialValue = stickValues["aux" + (sliderIndex + 1)]; + initialValue = stickValues["Aux" + (sliderIndex + 1)]; $(this) .noUiSlider({ @@ -172,7 +172,7 @@ $(document).ready(function() { }).on('slide change set', function(e, value) { value = Math.round(parseFloat(value)); - stickValues["aux" + (sliderIndex + 1)] = value; + stickValues["Aux" + (sliderIndex + 1)] = value; $(".tooltip", this).text(value); });