motor test mode polished
parent
7003a339ff
commit
2013095c01
|
@ -850,23 +850,33 @@ a:hover {
|
|||
.tab-motor_outputs .motor_testing {
|
||||
display: none;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .sliders {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .sliders input {
|
||||
-webkit-appearance: slider-vertical;
|
||||
|
||||
width: 48px;
|
||||
.tab-motor_outputs .motor_testing .sliders {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .values {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .values li {
|
||||
float: left;
|
||||
.tab-motor_outputs .motor_testing .sliders input {
|
||||
-webkit-appearance: slider-vertical;
|
||||
|
||||
width: 48px;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .values {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .values li {
|
||||
float: left;
|
||||
|
||||
width: 51px;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
.tab-motor_outputs .motor_testing .notice {
|
||||
float: right;
|
||||
|
||||
width: 51px;
|
||||
width: 490px;
|
||||
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
padding: 5px;
|
||||
|
||||
border: 1px dotted silver;
|
||||
}
|
||||
.tab-sensors {
|
||||
}
|
||||
|
|
|
@ -49,27 +49,38 @@
|
|||
Bars on the <strong>right</strong> are representing raw PWM signal for <strong>Servos</strong>.<br />
|
||||
</p>
|
||||
<div class="motor_testing">
|
||||
<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" />
|
||||
<div class="left">
|
||||
<div class="sliders">
|
||||
<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>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="values">
|
||||
<ul>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
<li>1000</li>
|
||||
</ul>
|
||||
<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