1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 09:15:42 +03:00

possibility to add and delete motor and servo rule

This commit is contained in:
Pawel Spychalski (DzikuVx) 2018-04-04 21:09:04 +02:00
parent 34c13c5010
commit 97e4ece259

View file

@ -1,3 +1,4 @@
/*global $*/
'use strict';
TABS.mixer = {};
@ -220,6 +221,20 @@ TABS.mixer.initialize = function (callback, scrollPosition) {
renderMotorMixRules();
});
$("[data-role='role-servo-add']").click(function () {
if (SERVO_RULES.hasFreeSlots()) {
SERVO_RULES.put(new ServoMixRule(0, 0, 100, 0));
renderServoMixRules();
}
});
$("[data-role='role-motor-add']").click(function () {
if (MOTOR_RULES.hasFreeSlots()) {
MOTOR_RULES.put(new MotorMixRule(1, 0, 0, 0));
renderMotorMixRules();
}
});
localize();
GUI.content_ready(callback);
}