1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-17 13:25:22 +03:00

add race conditions

This commit is contained in:
cTn 2014-01-16 03:09:17 +01:00
parent cbdb7a53d8
commit 2bd899e4a1

View file

@ -55,6 +55,7 @@ function tab_initialize_receiver() {
// curves
$('.tunings .throttle input').change(function() {
setTimeout(function() {
var mid = parseFloat($('.tunings .throttle input[name="mid"]').val());
var expo = parseFloat($('.tunings .throttle input[name="expo"]').val());
@ -78,9 +79,11 @@ function tab_initialize_receiver() {
context.lineWidth = 2;
context.stroke();
}, 0); // race condition, that should always trigger after all events are processed
}).change();
$('.tunings .rate input').change(function() {
setTimeout(function() {
var rate = parseFloat($('.tunings .rate input[name="rate"]').val());
var expo = parseFloat($('.tunings .rate input[name="expo"]').val());
@ -96,6 +99,7 @@ function tab_initialize_receiver() {
context.quadraticCurveTo(110, 58 - ((ratey / 2) * (1 - expo)), 220, 58 - ratey);
context.lineWidth = 2;
context.stroke();
}, 0); // race condition, that should always trigger after all events are processed
}).change();
$('a.update').click(function() {