mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Get context with jQuery
This commit is contained in:
parent
0e36882b7c
commit
d11ff74156
2 changed files with 4 additions and 4 deletions
|
@ -65,10 +65,10 @@
|
||||||
<a class="update" href="#">Save</a>
|
<a class="update" href="#">Save</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="throttle_curve">
|
<div class="throttle_curve">
|
||||||
<canvas id="throttle_curve_c" width="220" height="58"></canvas>
|
<canvas width="220" height="58"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="pitch_roll_curve">
|
<div class="pitch_roll_curve">
|
||||||
<canvas id="pitch_roll_curve_c" width="220" height="58"></canvas>
|
<canvas width="220" height="58"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div id="RX_plot">
|
<div id="RX_plot">
|
||||||
|
|
|
@ -61,7 +61,7 @@ function tab_initialize_receiver() {
|
||||||
var mid = parseFloat($('.tunings .throttle input[name="mid"]').val());
|
var mid = parseFloat($('.tunings .throttle input[name="mid"]').val());
|
||||||
var expo = parseFloat($('.tunings .throttle input[name="expo"]').val());
|
var expo = parseFloat($('.tunings .throttle input[name="expo"]').val());
|
||||||
|
|
||||||
var throttle_curve = document.getElementById("throttle_curve_c");
|
var throttle_curve = $('.throttle_curve canvas').get(0);
|
||||||
var context = throttle_curve.getContext("2d");
|
var context = throttle_curve.getContext("2d");
|
||||||
context.clearRect(0, 0, 220, 58);
|
context.clearRect(0, 0, 220, 58);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ function tab_initialize_receiver() {
|
||||||
var rate = parseFloat($('.tunings .rate input[name="rate"]').val());
|
var rate = parseFloat($('.tunings .rate input[name="rate"]').val());
|
||||||
var expo = parseFloat($('.tunings .rate input[name="expo"]').val());
|
var expo = parseFloat($('.tunings .rate input[name="expo"]').val());
|
||||||
|
|
||||||
var pitch_roll_curve = document.getElementById("pitch_roll_curve_c");
|
var pitch_roll_curve = $('.pitch_roll_curve canvas').get(0);
|
||||||
var context = pitch_roll_curve.getContext("2d");
|
var context = pitch_roll_curve.getContext("2d");
|
||||||
context.clearRect(0, 0, 220, 58);
|
context.clearRect(0, 0, 220, 58);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue