mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 16:55:22 +03:00
ability to add and save mix
This commit is contained in:
parent
97e4ece259
commit
4e5fd3b2b7
5 changed files with 83 additions and 28 deletions
|
@ -483,6 +483,10 @@ var mspHelper = (function (gui) {
|
|||
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SET_SERVO_MIX_RULE:
|
||||
console.log("Servo mix saved");
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP2_COMMON_MOTOR_MIXER:
|
||||
MOTOR_RULES.flush();
|
||||
|
||||
|
@ -504,6 +508,10 @@ var mspHelper = (function (gui) {
|
|||
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP2_COMMON_SET_MOTOR_MIXER:
|
||||
console.log("motor mixer saved");
|
||||
break;
|
||||
|
||||
case MSPCodes.MSP_SERVO_CONFIGURATIONS:
|
||||
//noinspection JSUndeclaredVariable
|
||||
SERVO_CONFIG = []; // empty the array as new data is coming in
|
||||
|
@ -2035,7 +2043,7 @@ var mspHelper = (function (gui) {
|
|||
|
||||
// prepare for next iteration
|
||||
servoIndex++;
|
||||
if (servoIndex == 16) { //This is the last rule. Not pretty, but we have to send all rules
|
||||
if (servoIndex == SERVO_RULES.getServoRulesCount()) { //This is the last rule. Not pretty, but we have to send all rules
|
||||
nextFunction = onCompleteCallback;
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP_SET_SERVO_MIX_RULE, buffer, false, nextFunction);
|
||||
|
@ -2083,7 +2091,7 @@ var mspHelper = (function (gui) {
|
|||
|
||||
// prepare for next iteration
|
||||
servoIndex++;
|
||||
if (servoIndex == MOTOR_RULES.length) { //This is the last rule. Not pretty, but we have to send all rules
|
||||
if (servoIndex == MOTOR_RULES.getMotorCount()) { //This is the last rule. Not pretty, but we have to send all rules
|
||||
nextFunction = onCompleteCallback;
|
||||
}
|
||||
MSP.send_message(MSPCodes.MSP2_COMMON_SET_MOTOR_MIXER, buffer, false, nextFunction);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue