diff --git a/tabs/servos.css b/tabs/servos.css index acfcdee5..7d1d5767 100644 --- a/tabs/servos.css +++ b/tabs/servos.css @@ -45,6 +45,13 @@ background-color: #ececec; } + .tab-servos table .channel { + width: 40px; + text-align: center; + } + .tab-servos table .channel input { + vertical-align: middle; + } .tab-servos table input[type="number"] { width: 65px; height: 20px; @@ -55,13 +62,6 @@ text-align: right; } - .tab-servos table .channel input[type="checkbox"]:first-child { - margin-left: 24px; - } - .tab-servos table .channel input[type="checkbox"] { - margin-top: 4px; - margin-right: 21px; - } .tab-servos table .direction { } .tab-servos .direction .name { diff --git a/tabs/servos.html b/tabs/servos.html index 331953a3..c9dcc6ea 100644 --- a/tabs/servos.html +++ b/tabs/servos.html @@ -1,6 +1,24 @@
Model:
+
Change Direction in TX To Match
+ + + + + + + + + + + + + + + + +
NameMIDMINMAXCH-1CH-2CH-3CH-4AUX1AUX2AUX3AUX4Direction
Gyroscope / Accelerometer Direction
@@ -10,17 +28,6 @@
-
Change Direction in TX To Match
- - - - - - - - - -
NameMIDMINMAXThrot | Roll | Pitch | Yaw | AUX1 | AUX2 | AUX3 | AUX4Direction
Enable Live mode:
diff --git a/tabs/servos.js b/tabs/servos.js index e2929494..71755455 100644 --- a/tabs/servos.js +++ b/tabs/servos.js @@ -57,16 +57,14 @@ function tab_initialize_servos() { \ \ \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ + \ + \ + \ + \ + \ + \ + \ + \ \ ' + name + '\ ' + alternate + '\ @@ -76,7 +74,7 @@ function tab_initialize_servos() { if (SERVO_CONFIG[obj].middle <= 7) { $('div.tab-servos table.fields tr:last td.middle input').prop('disabled', true); - $('div.tab-servos table.fields tr:last td.channel').find('input').eq(SERVO_CONFIG[obj].middle).prop('checked', true); + $('div.tab-servos table.fields tr:last td.channel input').eq(SERVO_CONFIG[obj].middle).prop('checked', true); } if (directions == true) { @@ -107,10 +105,10 @@ function tab_initialize_servos() { $('div.tab-servos table.fields tr:last').data('info', {'obj': obj}); // UI hooks - $('div.tab-servos table.fields tr:last td.channel').find('input').click(function() { + $('div.tab-servos table.fields tr:last td.channel input').click(function() { if($(this).is(':checked')) { $(this).parent().parent().find('td.middle input').prop('disabled', true); - $(this).parent().find('input').not($(this)).prop('checked', false); + $(this).parent().parent().find('.channel input').not($(this)).prop('checked', false); } else { $(this).parent().parent().find('td.middle input').prop('disabled', false).val(1500); } @@ -133,7 +131,8 @@ function tab_initialize_servos() { var info = $(this).data('info'); if ($('.middle input', this).is(':disabled')) { - var val = $('.channel input:checked', this).index(); + var selection = $('.channel input', this); + var val = selection.index(selection.filter(':checked')); SERVO_CONFIG[info.obj].middle = parseInt(val); } else {