mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
disable servo ui when its not necessary
This commit is contained in:
parent
66b7f31498
commit
ac02c9ac5e
2 changed files with 40 additions and 21 deletions
|
@ -121,26 +121,30 @@
|
||||||
</style>
|
</style>
|
||||||
<div class="tab-servos">
|
<div class="tab-servos">
|
||||||
Model: <strong class="model"></strong>
|
Model: <strong class="model"></strong>
|
||||||
<div class="title" style="width: 258px">Gyroscope / Accelerometer Direction</div>
|
<div class="supported_wrapper">
|
||||||
<table class="directions" style="width: 260px">
|
<div class="direction_wrapper">
|
||||||
<tr class="main">
|
<div class="title" style="width: 258px">Gyroscope / Accelerometer Direction</div>
|
||||||
<th style="width: 200px">Name</th>
|
<table class="directions" style="width: 260px">
|
||||||
<th>Direction</th>
|
<tr class="main">
|
||||||
</tr>
|
<th style="width: 200px">Name</th>
|
||||||
</table>
|
<th>Direction</th>
|
||||||
<div class="title">Change Direction in TX To Match</div>
|
</tr>
|
||||||
<table class="fields">
|
</table>
|
||||||
<tr class="main">
|
</div>
|
||||||
<th>Name</th>
|
<div class="title">Change Direction in TX To Match</div>
|
||||||
<th style="width: 70px">MID</th>
|
<table class="fields">
|
||||||
<th style="width: 70px">MIN</th>
|
<tr class="main">
|
||||||
<th style="width: 70px">MAX</th>
|
<th>Name</th>
|
||||||
<th style="width: 320px">Throt | Roll | Pitch | Yaw | AUX1 | AUX2 | AUX3 | AUX4</th>
|
<th style="width: 70px">MID</th>
|
||||||
<th style="width: 200px">Direction</th>
|
<th style="width: 70px">MIN</th>
|
||||||
</tr>
|
<th style="width: 70px">MAX</th>
|
||||||
</table>
|
<th style="width: 320px">Throt | Roll | Pitch | Yaw | AUX1 | AUX2 | AUX3 | AUX4</th>
|
||||||
<div class="live">
|
<th style="width: 200px">Direction</th>
|
||||||
<span>Enable Live mode: </span><input type="checkbox" />
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="live">
|
||||||
|
<span>Enable Live mode: </span><input type="checkbox" />
|
||||||
|
</div>
|
||||||
|
<a class="update" href="#" title="">Save</a>
|
||||||
</div>
|
</div>
|
||||||
<a class="update" href="#" title="">Save</a>
|
|
||||||
</div>
|
</div>
|
|
@ -47,6 +47,9 @@ function tab_initialize_servos() {
|
||||||
// rate
|
// rate
|
||||||
process_servos('Pitch Servo', '', 0, 2);
|
process_servos('Pitch Servo', '', 0, 2);
|
||||||
process_servos('Roll Servo', '', 1, 2);
|
process_servos('Roll Servo', '', 1, 2);
|
||||||
|
|
||||||
|
// gyro / acc direction is not shown in this model
|
||||||
|
$('div.direction_wrapper').hide();
|
||||||
break;
|
break;
|
||||||
case 8: // Flying Wing
|
case 8: // Flying Wing
|
||||||
// looking ok so far
|
// looking ok so far
|
||||||
|
@ -68,6 +71,9 @@ function tab_initialize_servos() {
|
||||||
process_servos('Wing 2', '', 4, 2);
|
process_servos('Wing 2', '', 4, 2);
|
||||||
process_servos('Rudd', '', 5, 2);
|
process_servos('Rudd', '', 5, 2);
|
||||||
process_servos('Elev', '', 6, 2);
|
process_servos('Elev', '', 6, 2);
|
||||||
|
|
||||||
|
// gyro / acc direction is not shown in this model
|
||||||
|
$('div.direction_wrapper').hide();
|
||||||
break;
|
break;
|
||||||
case 20: // Dualcopter
|
case 20: // Dualcopter
|
||||||
// looking ok so far
|
// looking ok so far
|
||||||
|
@ -87,6 +93,9 @@ function tab_initialize_servos() {
|
||||||
process_servos('Left', 'L YAW', 4, true);
|
process_servos('Left', 'L YAW', 4, true);
|
||||||
process_servos('Front', 'F YAW', 5, true);
|
process_servos('Front', 'F YAW', 5, true);
|
||||||
process_servos('Rear', 'YAW', 6, true);
|
process_servos('Rear', 'YAW', 6, true);
|
||||||
|
|
||||||
|
// gyro / acc direction is not shown in this model
|
||||||
|
$('div.direction_wrapper').hide();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
model.html('Doesn\'t support servos');
|
model.html('Doesn\'t support servos');
|
||||||
|
@ -100,6 +109,12 @@ function tab_initialize_servos() {
|
||||||
// rate
|
// rate
|
||||||
process_servos('Pitch Servo', '', 0, 2);
|
process_servos('Pitch Servo', '', 0, 2);
|
||||||
process_servos('Roll Servo', '', 1, 2);
|
process_servos('Roll Servo', '', 1, 2);
|
||||||
|
|
||||||
|
// gyro / acc direction is not shown in this model
|
||||||
|
$('div.direction_wrapper').hide();
|
||||||
|
} else {
|
||||||
|
// disable UI
|
||||||
|
$('div.supported_wrapper').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue