From 4734aaa637cfdd01a37143c00bbdb1e492309b55 Mon Sep 17 00:00:00 2001 From: jflyper Date: Sat, 5 Aug 2017 16:37:27 +0900 Subject: [PATCH] Fix MSP_SERVO_CONFIGURATIONS and MSP_SET_SERVO_CONFIGURATION handling for API version >= 1.33.0 Trivial bug. Should have been caught with simple testing. --- js/msp/MSPHelper.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index 19e0b4b8..7bf4cc51 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -416,8 +416,6 @@ MspHelper.prototype.process_data = function(dataHandler) { 'max': data.readU16(), 'middle': data.readU16(), 'rate': data.read8(), - 'angleAtMin': -90, - 'angleAtMax': 90, 'indexOfChannelToForward': data.readU8(), 'reversedInputSources': data.readU32() }; @@ -1614,7 +1612,7 @@ MspHelper.prototype.sendServoConfigurations = function(onCompleteCallback) { .push16(servoConfiguration.middle) .push8(servoConfiguration.rate); - if (semver.gte(CONFIG.apiVersion, "1.33.0")) { + if (semver.lt(CONFIG.apiVersion, "1.33.0")) { buffer.push8(servoConfiguration.angleAtMin) .push8(servoConfiguration.angleAtMax); }