mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 04:15:28 +03:00
minor code fixes
This commit is contained in:
parent
557f16bbec
commit
c9c5f8d2d9
2 changed files with 8 additions and 8 deletions
|
@ -22,7 +22,7 @@ var MotorMixRule = function (throttle, roll, pitch, yaw) {
|
||||||
|
|
||||||
self.getThrottleForMsp = function () {
|
self.getThrottleForMsp = function () {
|
||||||
return self.getThrottle() * 1000;
|
return self.getThrottle() * 1000;
|
||||||
}
|
};
|
||||||
|
|
||||||
self.setThrottle = function (data) {
|
self.setThrottle = function (data) {
|
||||||
throttle = data;
|
throttle = data;
|
||||||
|
|
|
@ -355,10 +355,10 @@ var mspHelper = (function (gui) {
|
||||||
if (data.byteLength % 7 === 0) {
|
if (data.byteLength % 7 === 0) {
|
||||||
for (i = 0; i < data.byteLength; i += 7) {
|
for (i = 0; i < data.byteLength; i += 7) {
|
||||||
SERVO_RULES.put(new ServoMixRule(
|
SERVO_RULES.put(new ServoMixRule(
|
||||||
data.getInt8(i + 0, true),
|
data.getInt8(i),
|
||||||
data.getInt8(i + 1, true),
|
data.getInt8(i + 1),
|
||||||
data.getInt8(i + 2, true),
|
data.getInt8(i + 2),
|
||||||
data.getInt8(i + 3, true)
|
data.getInt8(i + 3)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,11 +374,11 @@ var mspHelper = (function (gui) {
|
||||||
var rule = new MotorMixRule(0, 0, 0, 0);
|
var rule = new MotorMixRule(0, 0, 0, 0);
|
||||||
|
|
||||||
rule.fromMsp(
|
rule.fromMsp(
|
||||||
data.getUint16(i + 0, true),
|
data.getUint16(i, true),
|
||||||
data.getUint16(i + 2, true),
|
data.getUint16(i + 2, true),
|
||||||
data.getUint16(i + 4, true),
|
data.getUint16(i + 4, true),
|
||||||
data.getUint16(i + 6, true)
|
data.getUint16(i + 6, true)
|
||||||
)
|
);
|
||||||
|
|
||||||
MOTOR_RULES.put(rule);
|
MOTOR_RULES.put(rule);
|
||||||
}
|
}
|
||||||
|
@ -1762,7 +1762,7 @@ var mspHelper = (function (gui) {
|
||||||
var nextFunction = sendMixer,
|
var nextFunction = sendMixer,
|
||||||
servoIndex = 0;
|
servoIndex = 0;
|
||||||
|
|
||||||
if (MOTOR_RULES.length == 0) {
|
if (MOTOR_RULES.length === 0) {
|
||||||
onCompleteCallback();
|
onCompleteCallback();
|
||||||
} else {
|
} else {
|
||||||
nextFunction();
|
nextFunction();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue