mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 04:45:20 +03:00
CF/BF - Delete unused angleAtMin/Max from configurator to match API
1.33.0
This commit is contained in:
parent
49100d29bd
commit
5f0149d161
4 changed files with 26 additions and 13 deletions
|
@ -377,8 +377,24 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
|
||||
case MSPCodes.MSP_SERVO_CONFIGURATIONS:
|
||||
SERVO_CONFIG = []; // empty the array as new data is coming in
|
||||
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
||||
if (data.byteLength % 12 == 0) {
|
||||
for (var i = 0; i < data.byteLength; i += 12) {
|
||||
var arr = {
|
||||
'min': data.readU16(),
|
||||
'max': data.readU16(),
|
||||
'middle': data.readU16(),
|
||||
'rate': data.read8(),
|
||||
'angleAtMin': -90,
|
||||
'angleAtMax': 90,
|
||||
'indexOfChannelToForward': data.readU8(),
|
||||
'reversedInputSources': data.readU32()
|
||||
};
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.12.0")) {
|
||||
SERVO_CONFIG.push(arr);
|
||||
}
|
||||
}
|
||||
} else if (semver.gte(CONFIG.apiVersion, "1.12.0")) {
|
||||
if (data.byteLength % 14 == 0) {
|
||||
for (var i = 0; i < data.byteLength; i += 14) {
|
||||
var arr = {
|
||||
|
@ -1479,9 +1495,12 @@ MspHelper.prototype.sendServoConfigurations = function(onCompleteCallback) {
|
|||
.push16(servoConfiguration.min)
|
||||
.push16(servoConfiguration.max)
|
||||
.push16(servoConfiguration.middle)
|
||||
.push8(servoConfiguration.rate)
|
||||
.push8(servoConfiguration.angleAtMin)
|
||||
.push8(servoConfiguration.rate);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
||||
buffer.push8(servoConfiguration.angleAtMin)
|
||||
.push8(servoConfiguration.angleAtMax);
|
||||
}
|
||||
|
||||
var out = servoConfiguration.indexOfChannelToForward;
|
||||
if (out == undefined) {
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
<th i18n="servosMid"></th>
|
||||
<th i18n="servosMin"></th>
|
||||
<th i18n="servosMax"></th>
|
||||
<th class="wide" i18n="servosAngleAtMin"></th>
|
||||
<th class="wide" i18n="servosAngleAtMax"></th>
|
||||
<th class="short">CH1</th>
|
||||
<th class="short">CH2</th>
|
||||
<th class="short">CH3</th>
|
||||
|
|
|
@ -66,8 +66,6 @@ TABS.servos.initialize = function (callback) {
|
|||
<td class="middle"><input type="number" min="500" max="2500" value="' + SERVO_CONFIG[obj].middle + '" /></td>\
|
||||
<td class="min"><input type="number" min="500" max="2500" value="' + SERVO_CONFIG[obj].min +'" /></td>\
|
||||
<td class="max"><input type="number" min="500" max="2500" value="' + SERVO_CONFIG[obj].max +'" /></td>\
|
||||
<td class="angleAtMin"><input type="number" min="-90" max="0" value="' + (-SERVO_CONFIG[obj].angleAtMin) +'" /></td>\
|
||||
<td class="angleAtMax"><input type="number" min="0" max="90" value="' + SERVO_CONFIG[obj].angleAtMax +'" /></td>\
|
||||
' + servoCheckbox + '\
|
||||
<td class="direction">\
|
||||
</td>\
|
||||
|
@ -121,8 +119,6 @@ TABS.servos.initialize = function (callback) {
|
|||
SERVO_CONFIG[info.obj].middle = parseInt($('.middle input', this).val());
|
||||
SERVO_CONFIG[info.obj].min = parseInt($('.min input', this).val());
|
||||
SERVO_CONFIG[info.obj].max = parseInt($('.max input', this).val());
|
||||
SERVO_CONFIG[info.obj].angleAtMin = -parseInt($('.angleAtMin input', this).val());
|
||||
SERVO_CONFIG[info.obj].angleAtMax = parseInt($('.angleAtMax input', this).val());
|
||||
|
||||
var val = parseInt($('.direction select', this).val());
|
||||
SERVO_CONFIG[info.obj].rate = val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue