1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 16:25:19 +03:00

Rename 3D to REVERSIBLE_MOTORS

This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-02-19 14:11:18 +01:00
parent 94b617dcc9
commit 8e7e83f282
4 changed files with 35 additions and 35 deletions

View file

@ -410,14 +410,14 @@ var mspHelper = (function (gui) {
BATTERY_CONFIG.battery_capacity_unit = (data.getUint8(offset++) ? 'mWh' : 'mAh');
break;
case MSPCodes.MSP_3D:
_3D.deadband3d_low = data.getUint16(offset, true);
REVERSIBLE_MOTORS.deadband_low = data.getUint16(offset, true);
offset += 2;
_3D.deadband3d_high = data.getUint16(offset, true);
REVERSIBLE_MOTORS.deadband_high = data.getUint16(offset, true);
offset += 2;
_3D.neutral3d = data.getUint16(offset, true);
REVERSIBLE_MOTORS.neutral = data.getUint16(offset, true);
if (semver.lt(CONFIG.apiVersion, "1.17.0")) {
offset += 2;
_3D.deadband3d_throttle = data.getUint16(offset, true);
REVERSIBLE_MOTORS.deadband_throttle = data.getUint16(offset, true);
}
break;
case MSPCodes.MSP_MOTOR_PINS:
@ -587,7 +587,7 @@ var mspHelper = (function (gui) {
RC_deadband.yaw_deadband = data.getUint8(offset++);
RC_deadband.alt_hold_deadband = data.getUint8(offset++);
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
_3D.deadband3d_throttle = data.getUint16(offset, true);
REVERSIBLE_MOTORS.deadband_throttle = data.getUint16(offset, true);
}
break;
case MSPCodes.MSP_SENSOR_ALIGNMENT:
@ -1803,15 +1803,15 @@ var mspHelper = (function (gui) {
break;
case MSPCodes.MSP_SET_3D:
buffer.push(lowByte(_3D.deadband3d_low));
buffer.push(highByte(_3D.deadband3d_low));
buffer.push(lowByte(_3D.deadband3d_high));
buffer.push(highByte(_3D.deadband3d_high));
buffer.push(lowByte(_3D.neutral3d));
buffer.push(highByte(_3D.neutral3d));
buffer.push(lowByte(REVERSIBLE_MOTORS.deadband_low));
buffer.push(highByte(REVERSIBLE_MOTORS.deadband_low));
buffer.push(lowByte(REVERSIBLE_MOTORS.deadband_high));
buffer.push(highByte(REVERSIBLE_MOTORS.deadband_high));
buffer.push(lowByte(REVERSIBLE_MOTORS.neutral));
buffer.push(highByte(REVERSIBLE_MOTORS.neutral));
if (semver.lt(CONFIG.apiVersion, "1.17.0")) {
buffer.push(lowByte(_3D.deadband3d_throttle));
buffer.push(highByte(_3D.deadband3d_throttle));
buffer.push(lowByte(REVERSIBLE_MOTORS.deadband_throttle));
buffer.push(highByte(REVERSIBLE_MOTORS.deadband_throttle));
}
break;
@ -1820,8 +1820,8 @@ var mspHelper = (function (gui) {
buffer.push(RC_deadband.yaw_deadband);
buffer.push(RC_deadband.alt_hold_deadband);
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
buffer.push(lowByte(_3D.deadband3d_throttle));
buffer.push(highByte(_3D.deadband3d_throttle));
buffer.push(lowByte(REVERSIBLE_MOTORS.deadband_throttle));
buffer.push(highByte(REVERSIBLE_MOTORS.deadband_throttle));
}
break;