add pid names to PID table from PID_names array

10.3.x-maintenance
cTn 2014-05-03 22:54:33 +02:00
parent 7e82e96114
commit 4f8f45f290
2 changed files with 23 additions and 10 deletions

View File

@ -7,60 +7,60 @@
<th class="derivative">Derivative</th>
</tr>
<tr class="ROLL"><!-- 0 -->
<td>ROLL</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="PITCH"><!-- 1 -->
<td>PITCH</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="YAW"><!-- 2 -->
<td>YAW</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="ALT"><!-- 3 -->
<td>ALT</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="Vario"><!-- 9 -->
<td>Vario</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.001" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="Pos"><!-- 4 -->
<td>Pos</td>
<td></td>
<td><input type="number" name="p" step="0.01" min="0" max="2.55" /></td>
<td><input type="number" name="i" step="0.01" min="0" max="2.55" /></td>
</tr>
<tr class="PosR"><!-- 5 -->
<td>PosR</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.01" min="0" max="2.55" /></td>
<td><input type="number" name="d" step="0.001" min="0" max="0.255" /></td>
</tr>
<tr class="NavR"><!-- 6 -->
<td>NavR</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.01" min="0" max="2.55" /></td>
<td><input type="number" name="d" step="0.001" min="0" max="0.255" /></td>
</tr>
<tr class="LEVEL"><!-- 7 -->
<td>LEVEL</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
<td><input type="number" name="i" step="0.01" min="0" max="0.255" /></td>
<td><input type="number" name="d" step="1" min="0" max="255" /></td>
</tr>
<tr class="MAG"><!-- 8 -->
<td>MAG</td>
<td></td>
<td><input type="number" name="p" step="0.1" min="0" max="25.5" /></td>
</tr>
</table>

View File

@ -22,6 +22,19 @@ function tab_initialize_pid_tuning() {
}
function process_html() {
// Fill in the names from PID_names array
// this needs to be reworked, but will do for now
$('.pid_tuning tr:eq(1) td:first').text(PID_names[0]);
$('.pid_tuning tr:eq(2) td:first').text(PID_names[1]);
$('.pid_tuning tr:eq(3) td:first').text(PID_names[2]);
$('.pid_tuning tr:eq(4) td:first').text(PID_names[3]);
$('.pid_tuning tr:eq(5) td:first').text(PID_names[9]);
$('.pid_tuning tr:eq(6) td:first').text(PID_names[4]);
$('.pid_tuning tr:eq(7) td:first').text(PID_names[5]);
$('.pid_tuning tr:eq(8) td:first').text(PID_names[6]);
$('.pid_tuning tr:eq(9) td:first').text(PID_names[7]);
$('.pid_tuning tr:eq(10) td:first').text(PID_names[8]);
// Fill in the data from PIDs array
var i = 0;
$('.pid_tuning .ROLL input').each(function() {