diff --git a/css/style.css b/css/style.css index 75a33d2f..f398853f 100644 --- a/css/style.css +++ b/css/style.css @@ -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 { } diff --git a/tabs/motor_outputs.html b/tabs/motor_outputs.html index 8a6c5a56..30a06b49 100644 --- a/tabs/motor_outputs.html +++ b/tabs/motor_outputs.html @@ -49,27 +49,38 @@ Bars on the right are representing raw PWM signal for Servos.

-
- - - - - - - - +
+
+ + + + + + + + +
+
+
    +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
  • 1000
  • +
+
-
-
    -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
  • 1000
  • -
+
+ Motor Test Mode Notice:
+ Moving the sliders to the top will cause the motors to spin up.
+ In order to prevent injury you must remove ALL propellers before using this feature.
+ If you understand these instructions check the box below to enable motor test mode.
+
+
+
\ No newline at end of file diff --git a/tabs/motor_outputs.js b/tabs/motor_outputs.js index f1c432cb..57d5c376 100644 --- a/tabs/motor_outputs.js +++ b/tabs/motor_outputs.js @@ -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)); }