motor test mode polished
parent
7003a339ff
commit
2013095c01
|
@ -868,6 +868,16 @@ a:hover {
|
|||
|
||||
text-align: center;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .notice {
|
||||
float: right;
|
||||
|
||||
width: 490px;
|
||||
|
||||
margin-top: 20px;
|
||||
padding: 5px;
|
||||
|
||||
border: 1px dotted silver;
|
||||
}
|
||||
.tab-sensors {
|
||||
}
|
||||
.tab-sensors #gyro {
|
||||
|
|
|
@ -49,15 +49,16 @@
|
|||
Bars on the <strong>right</strong> are representing raw PWM signal for <strong>Servos</strong>.<br />
|
||||
</p>
|
||||
<div class="motor_testing">
|
||||
<div class="left">
|
||||
<div class="sliders">
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
<input type="range" min="1000" max="2000" value="1000" disabled="disabled" />
|
||||
</div>
|
||||
<div class="values">
|
||||
<ul>
|
||||
|
@ -72,4 +73,14 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice">
|
||||
<strong>Motor Test Mode Notice:</strong><br />
|
||||
Moving the sliders to the top will cause the motors to <strong>spin up</strong>.<br />
|
||||
In order to prevent injury you must <strong style="color: red">remove ALL propellers</strong> before using this feature.<br />
|
||||
If you understand these instructions check the <strong>box</strong> below to <strong style="color: green">enable</strong> motor test mode.<br />
|
||||
<br />
|
||||
<input type="checkbox" />
|
||||
</div>
|
||||
<div class="cler-both"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -24,6 +24,22 @@ function tab_initialize_motor_outputs() {
|
|||
send_message(MSP_codes.MSP_SET_MOTOR, buffer_out);
|
||||
});
|
||||
|
||||
$('div.notice input').change(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('div.sliders input').prop('disabled', false);
|
||||
} else {
|
||||
// disable sliders
|
||||
$('div.sliders input').prop('disabled', true);
|
||||
|
||||
// change all values to default
|
||||
$('div.sliders input').val(1000);
|
||||
$('div.values li').html(1000);
|
||||
|
||||
// trigger change event so values are sent to mcu
|
||||
$('div.sliders input').change();
|
||||
}
|
||||
});
|
||||
|
||||
// enable Motor data pulling
|
||||
timers.push(setInterval(motorPoll, 50));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue