mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 21:35:30 +03:00
build system - progress
This commit is contained in:
parent
97341e95ca
commit
61316503ca
8 changed files with 33802 additions and 138 deletions
25323
build/script.js
Normal file
25323
build/script.js
Normal file
File diff suppressed because one or more lines are too long
8064
build/styles.css
Normal file
8064
build/styles.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,73 +1,74 @@
|
||||||
/* Definition of Fonts */
|
/* Definition of Fonts */
|
||||||
|
|
||||||
|
/*noinspection CssUnknownTarget*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sanssemibold';
|
font-family: 'open_sanssemibold';
|
||||||
src: url('opensans-semibold-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-semibold-webfont.eot');
|
||||||
src: url('opensans-semibold-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-semibold-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-semibold-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-semibold-webfont.woff2') format('woff2'),
|
||||||
url('opensans-semibold-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-semibold-webfont.woff') format('woff'),
|
||||||
url('opensans-semibold-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-semibold-webfont.ttf') format('truetype'),
|
||||||
url('opensans-semibold-webfont.svg#open_sanssemibold') format('svg');
|
url('../css/opensans_webfontkit/opensans-semibold-webfont.svg#open_sanssemibold') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sansregular';
|
font-family: 'open_sansregular';
|
||||||
src: url('opensans-regular-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-regular-webfont.eot');
|
||||||
src: url('opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-regular-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-regular-webfont.woff2') format('woff2'),
|
||||||
url('opensans-regular-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-regular-webfont.woff') format('woff'),
|
||||||
url('opensans-regular-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-regular-webfont.ttf') format('truetype'),
|
||||||
url('opensans-regular-webfont.svg#open_sansregular') format('svg');
|
url('../css/opensans_webfontkit/opensans-regular-webfont.svg#open_sansregular') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sanslight';
|
font-family: 'open_sanslight';
|
||||||
src: url('opensans-light-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-light-webfont.eot');
|
||||||
src: url('opensans-light-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-light-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-light-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-light-webfont.woff2') format('woff2'),
|
||||||
url('opensans-light-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-light-webfont.woff') format('woff'),
|
||||||
url('opensans-light-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-light-webfont.ttf') format('truetype'),
|
||||||
url('opensans-light-webfont.svg#open_sanslight') format('svg');
|
url('../css/opensans_webfontkit/opensans-light-webfont.svg#open_sanslight') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sansitalic';
|
font-family: 'open_sansitalic';
|
||||||
src: url('opensans-italic-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-italic-webfont.eot');
|
||||||
src: url('opensans-italic-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-italic-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-italic-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-italic-webfont.woff2') format('woff2'),
|
||||||
url('opensans-italic-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-italic-webfont.woff') format('woff'),
|
||||||
url('opensans-italic-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-italic-webfont.ttf') format('truetype'),
|
||||||
url('opensans-italic-webfont.svg#open_sansitalic') format('svg');
|
url('../css/opensans_webfontkit/opensans-italic-webfont.svg#open_sansitalic') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sansbold_italic';
|
font-family: 'open_sansbold_italic';
|
||||||
src: url('opensans-bolditalic-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-bolditalic-webfont.eot');
|
||||||
src: url('opensans-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-bolditalic-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-bolditalic-webfont.woff2') format('woff2'),
|
||||||
url('opensans-bolditalic-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-bolditalic-webfont.woff') format('woff'),
|
||||||
url('opensans-bolditalic-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-bolditalic-webfont.ttf') format('truetype'),
|
||||||
url('opensans-bolditalic-webfont.svg#open_sansbold_italic') format('svg');
|
url('../css/opensans_webfontkit/opensans-bolditalic-webfont.svg#open_sansbold_italic') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'open_sansbold';
|
font-family: 'open_sansbold';
|
||||||
src: url('opensans-bold-webfont.eot');
|
src: url('../css/opensans_webfontkit/opensans-bold-webfont.eot');
|
||||||
src: url('opensans-bold-webfont.eot?#iefix') format('embedded-opentype'),
|
src: url('../css/opensans_webfontkit/opensans-bold-webfont.eot?#iefix') format('embedded-opentype'),
|
||||||
url('opensans-bold-webfont.woff2') format('woff2'),
|
url('../css/opensans_webfontkit/opensans-bold-webfont.woff2') format('woff2'),
|
||||||
url('opensans-bold-webfont.woff') format('woff'),
|
url('../css/opensans_webfontkit/opensans-bold-webfont.woff') format('woff'),
|
||||||
url('opensans-bold-webfont.ttf') format('truetype'),
|
url('../css/opensans_webfontkit/opensans-bold-webfont.ttf') format('truetype'),
|
||||||
url('opensans-bold-webfont.svg#open_sansbold') format('svg');
|
url('../css/opensans_webfontkit/opensans-bold-webfont.svg#open_sansbold') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
111
gulpfile.js
Normal file
111
gulpfile.js
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
var gulp = require('gulp');
|
||||||
|
var rename = require('gulp-rename');
|
||||||
|
var uglify = require('gulp-uglify');
|
||||||
|
var concat = require('gulp-concat');
|
||||||
|
var minifyCSS = require('gulp-minify-css');
|
||||||
|
|
||||||
|
var sources = {};
|
||||||
|
|
||||||
|
sources.css = [
|
||||||
|
'./main.css',
|
||||||
|
'./js/libraries/jquery.nouislider.min.css',
|
||||||
|
'./js/libraries/jquery.nouislider.pips.min.css',
|
||||||
|
'./js/libraries/flightindicators.css',
|
||||||
|
'./tabs/*.css',
|
||||||
|
'./css/opensans_webfontkit/fonts.css',
|
||||||
|
'./css/dropdown-lists/css/style_lists.css',
|
||||||
|
'./js/libraries/switchery/switchery.css',
|
||||||
|
'./js/libraries/jbox/jBox.css'
|
||||||
|
];
|
||||||
|
|
||||||
|
sources.js = [
|
||||||
|
'./js/libraries/q.js',
|
||||||
|
'./js/libraries/google-analytics-bundle.js',
|
||||||
|
'./js/libraries/jquery-2.1.4.min.js',
|
||||||
|
'./js/libraries/jquery-ui-1.11.4.min.js',
|
||||||
|
'./js/libraries/d3.min.js',
|
||||||
|
'./js/libraries/jquery.nouislider.all.min.js',
|
||||||
|
'./js/libraries/three/three.min.js',
|
||||||
|
'./js/libraries/three/Projector.js',
|
||||||
|
'./js/libraries/three/CanvasRenderer.js',
|
||||||
|
'./js/libraries/jquery.flightindicators.js',
|
||||||
|
'./js/libraries/semver.js',
|
||||||
|
'./js/libraries/jbox/jBox.min.js',
|
||||||
|
'./js/libraries/switchery/switchery.js',
|
||||||
|
'./js/libraries/jquery.ba-throttle-debounce.js',
|
||||||
|
'./js/libraries/inflection.min.js',
|
||||||
|
'./js/libraries/bluebird.min.js',
|
||||||
|
'./js/injected_methods.js',
|
||||||
|
'./js/intervals.js',
|
||||||
|
'./js/timeouts.js',
|
||||||
|
'./js/pid_controller.js',
|
||||||
|
'./js/simple_smooth_filter.js',
|
||||||
|
'./js/walking_average_filter.js',
|
||||||
|
'./js/gui.js',
|
||||||
|
'./js/msp/MSPCodes.js',
|
||||||
|
'./js/msp/MSPHelper.js',
|
||||||
|
'./js/msp/MSPchainer.js',
|
||||||
|
'./js/port_handler.js',
|
||||||
|
'./js/serial.js',
|
||||||
|
'./js/model.js',
|
||||||
|
'./js/serial_backend.js',
|
||||||
|
'./js/data_storage.js',
|
||||||
|
'./js/fc.js',
|
||||||
|
'./js/msp.js',
|
||||||
|
'./js/protocols/stm32.js',
|
||||||
|
'./js/protocols/stm32usbdfu.js',
|
||||||
|
'./js/localization.js',
|
||||||
|
'./js/boards.js',
|
||||||
|
'./js/tasks.js',
|
||||||
|
'./main.js',
|
||||||
|
'./tabs/*.js',
|
||||||
|
'./js/eventFrequencyAnalyzer.js',
|
||||||
|
'./js/periodicStatusUpdater.js',
|
||||||
|
'./js/serial_queue.js',
|
||||||
|
'./js/msp_balanced_interval.js',
|
||||||
|
'./tabs/advanced_tuning.js'
|
||||||
|
];
|
||||||
|
|
||||||
|
gulp.task('build-css', function () {
|
||||||
|
|
||||||
|
return gulp.src(sources.css)
|
||||||
|
.pipe(concat('styles.css'))
|
||||||
|
.pipe(gulp.dest('./build/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('build-js', function () {
|
||||||
|
|
||||||
|
return gulp.src(sources.js)
|
||||||
|
.pipe(concat('script.js'))
|
||||||
|
.pipe(gulp.dest('./build/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('deploy-css', function () {
|
||||||
|
|
||||||
|
return gulp.src(sources.css)
|
||||||
|
.pipe(concat('styles.css'))
|
||||||
|
.pipe(minifyCSS())
|
||||||
|
.pipe(gulp.dest('./build/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('deploy-js', function () {
|
||||||
|
|
||||||
|
return gulp.src(sources.js)
|
||||||
|
.pipe(concat('script.js'))
|
||||||
|
.pipe(uglify())
|
||||||
|
.pipe(gulp.dest('./build/'));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('deploy', ['deploy-css', 'deploy-js']);
|
||||||
|
|
||||||
|
gulp.task('watch', function () {
|
||||||
|
gulp.watch('js/*.js', ['build-js']);
|
||||||
|
gulp.watch('css/*.css', ['build-css']);
|
||||||
|
gulp.watch('main.css', ['build-css']);
|
||||||
|
gulp.watch('main.js', ['build-js']);
|
||||||
|
gulp.watch('tabs/*.js', ['build-js']);
|
||||||
|
gulp.watch('tabs/*.css', ['build-css']);
|
||||||
|
gulp.watch('eventPage.js', ['build-js']);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('default', ['build-js', 'build-css']);
|
252
js/libraries/jquery.ba-throttle-debounce.js
Normal file
252
js/libraries/jquery.ba-throttle-debounce.js
Normal file
|
@ -0,0 +1,252 @@
|
||||||
|
/*!
|
||||||
|
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
||||||
|
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||||
|
*
|
||||||
|
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||||
|
* Dual licensed under the MIT and GPL licenses.
|
||||||
|
* http://benalman.com/about/license/
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Script: jQuery throttle / debounce: Sometimes, less is more!
|
||||||
|
//
|
||||||
|
// *Version: 1.1, Last updated: 3/7/2010*
|
||||||
|
//
|
||||||
|
// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||||
|
// GitHub - http://github.com/cowboy/jquery-throttle-debounce/
|
||||||
|
// Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js
|
||||||
|
// (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb)
|
||||||
|
//
|
||||||
|
// About: License
|
||||||
|
//
|
||||||
|
// Copyright (c) 2010 "Cowboy" Ben Alman,
|
||||||
|
// Dual licensed under the MIT and GPL licenses.
|
||||||
|
// http://benalman.com/about/license/
|
||||||
|
//
|
||||||
|
// About: Examples
|
||||||
|
//
|
||||||
|
// These working examples, complete with fully commented code, illustrate a few
|
||||||
|
// ways in which this plugin can be used.
|
||||||
|
//
|
||||||
|
// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
|
||||||
|
// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
|
||||||
|
//
|
||||||
|
// About: Support and Testing
|
||||||
|
//
|
||||||
|
// Information about what version or versions of jQuery this plugin has been
|
||||||
|
// tested with, what browsers it has been tested in, and where the unit tests
|
||||||
|
// reside (so you can test it yourself).
|
||||||
|
//
|
||||||
|
// jQuery Versions - none, 1.3.2, 1.4.2
|
||||||
|
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1.
|
||||||
|
// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/
|
||||||
|
//
|
||||||
|
// About: Release History
|
||||||
|
//
|
||||||
|
// 1.1 - (3/7/2010) Fixed a bug in <jQuery.throttle> where trailing callbacks
|
||||||
|
// executed later than they should. Reworked a fair amount of internal
|
||||||
|
// logic as well.
|
||||||
|
// 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over
|
||||||
|
// from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the
|
||||||
|
// no_trailing throttle parameter and debounce functionality.
|
||||||
|
//
|
||||||
|
// Topic: Note for non-jQuery users
|
||||||
|
//
|
||||||
|
// jQuery isn't actually required for this plugin, because nothing internal
|
||||||
|
// uses any jQuery methods or properties. jQuery is just used as a namespace
|
||||||
|
// under which these methods can exist.
|
||||||
|
//
|
||||||
|
// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
|
||||||
|
// when this plugin is loaded, the method described below will be created in
|
||||||
|
// the `Cowboy` namespace. Usage will be exactly the same, but instead of
|
||||||
|
// $.method() or jQuery.method(), you'll need to use Cowboy.method().
|
||||||
|
|
||||||
|
var throttle_debounce = (function(){
|
||||||
|
'$:nomunge'; // Used by YUI compressor.
|
||||||
|
|
||||||
|
// Since jQuery really isn't required for this plugin, use `jQuery` as the
|
||||||
|
// namespace only if it already exists, otherwise use the `Cowboy` namespace,
|
||||||
|
// creating it if necessary.
|
||||||
|
var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
|
||||||
|
|
||||||
|
// Internal method reference.
|
||||||
|
jq_throttle;
|
||||||
|
|
||||||
|
// Method: jQuery.throttle
|
||||||
|
//
|
||||||
|
// Throttle execution of a function. Especially useful for rate limiting
|
||||||
|
// execution of handlers on events like resize and scroll. If you want to
|
||||||
|
// rate-limit execution of a function to a single time, see the
|
||||||
|
// <jQuery.debounce> method.
|
||||||
|
//
|
||||||
|
// In this visualization, | is a throttled-function call and X is the actual
|
||||||
|
// callback execution:
|
||||||
|
//
|
||||||
|
// > Throttled with `no_trailing` specified as false or unspecified:
|
||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
|
// > X X X X X X X X X X X X
|
||||||
|
// >
|
||||||
|
// > Throttled with `no_trailing` specified as true:
|
||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
|
// > X X X X X X X X X X
|
||||||
|
//
|
||||||
|
// Usage:
|
||||||
|
//
|
||||||
|
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
|
||||||
|
// >
|
||||||
|
// > jQuery('selector').bind( 'someevent', throttled );
|
||||||
|
// > jQuery('selector').unbind( 'someevent', throttled );
|
||||||
|
//
|
||||||
|
// This also works in jQuery 1.4+:
|
||||||
|
//
|
||||||
|
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
||||||
|
// > jQuery('selector').unbind( 'someevent', callback );
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
//
|
||||||
|
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
||||||
|
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
||||||
|
// no_trailing - (Boolean) Optional, defaults to false. If no_trailing is
|
||||||
|
// true, callback will only execute every `delay` milliseconds while the
|
||||||
|
// throttled-function is being called. If no_trailing is false or
|
||||||
|
// unspecified, callback will be executed one final time after the last
|
||||||
|
// throttled-function call. (After the throttled-function has not been
|
||||||
|
// called for `delay` milliseconds, the internal counter is reset)
|
||||||
|
// callback - (Function) A function to be executed after delay milliseconds.
|
||||||
|
// The `this` context and all arguments are passed through, as-is, to
|
||||||
|
// `callback` when the throttled-function is executed.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
//
|
||||||
|
// (Function) A new, throttled, function.
|
||||||
|
|
||||||
|
$.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) {
|
||||||
|
// After wrapper has stopped being called, this timeout ensures that
|
||||||
|
// `callback` is executed at the proper times in `throttle` and `end`
|
||||||
|
// debounce modes.
|
||||||
|
var timeout_id,
|
||||||
|
|
||||||
|
// Keep track of the last time `callback` was executed.
|
||||||
|
last_exec = 0;
|
||||||
|
|
||||||
|
// `no_trailing` defaults to falsy.
|
||||||
|
if ( typeof no_trailing !== 'boolean' ) {
|
||||||
|
debounce_mode = callback;
|
||||||
|
callback = no_trailing;
|
||||||
|
no_trailing = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The `wrapper` function encapsulates all of the throttling / debouncing
|
||||||
|
// functionality and when executed will limit the rate at which `callback`
|
||||||
|
// is executed.
|
||||||
|
function wrapper() {
|
||||||
|
var that = this,
|
||||||
|
elapsed = +new Date() - last_exec,
|
||||||
|
args = arguments;
|
||||||
|
|
||||||
|
// Execute `callback` and update the `last_exec` timestamp.
|
||||||
|
function exec() {
|
||||||
|
last_exec = +new Date();
|
||||||
|
callback.apply( that, args );
|
||||||
|
};
|
||||||
|
|
||||||
|
// If `debounce_mode` is true (at_begin) this is used to clear the flag
|
||||||
|
// to allow future `callback` executions.
|
||||||
|
function clear() {
|
||||||
|
timeout_id = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( debounce_mode && !timeout_id ) {
|
||||||
|
// Since `wrapper` is being called for the first time and
|
||||||
|
// `debounce_mode` is true (at_begin), execute `callback`.
|
||||||
|
exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear any existing timeout.
|
||||||
|
timeout_id && clearTimeout( timeout_id );
|
||||||
|
|
||||||
|
if ( debounce_mode === undefined && elapsed > delay ) {
|
||||||
|
// In throttle mode, if `delay` time has been exceeded, execute
|
||||||
|
// `callback`.
|
||||||
|
exec();
|
||||||
|
|
||||||
|
} else if ( no_trailing !== true ) {
|
||||||
|
// In trailing throttle mode, since `delay` time has not been
|
||||||
|
// exceeded, schedule `callback` to execute `delay` ms after most
|
||||||
|
// recent execution.
|
||||||
|
//
|
||||||
|
// If `debounce_mode` is true (at_begin), schedule `clear` to execute
|
||||||
|
// after `delay` ms.
|
||||||
|
//
|
||||||
|
// If `debounce_mode` is false (at end), schedule `callback` to
|
||||||
|
// execute after `delay` ms.
|
||||||
|
timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set the guid of `wrapper` function to the same of original callback, so
|
||||||
|
// it can be removed in jQuery 1.4+ .unbind or .die by using the original
|
||||||
|
// callback as a reference.
|
||||||
|
if ( $.guid ) {
|
||||||
|
wrapper.guid = callback.guid = callback.guid || $.guid++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the wrapper function.
|
||||||
|
return wrapper;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Method: jQuery.debounce
|
||||||
|
//
|
||||||
|
// Debounce execution of a function. Debouncing, unlike throttling,
|
||||||
|
// guarantees that a function is only executed a single time, either at the
|
||||||
|
// very beginning of a series of calls, or at the very end. If you want to
|
||||||
|
// simply rate-limit execution of a function, see the <jQuery.throttle>
|
||||||
|
// method.
|
||||||
|
//
|
||||||
|
// In this visualization, | is a debounced-function call and X is the actual
|
||||||
|
// callback execution:
|
||||||
|
//
|
||||||
|
// > Debounced with `at_begin` specified as false or unspecified:
|
||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
|
// > X X
|
||||||
|
// >
|
||||||
|
// > Debounced with `at_begin` specified as true:
|
||||||
|
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
||||||
|
// > X X
|
||||||
|
//
|
||||||
|
// Usage:
|
||||||
|
//
|
||||||
|
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
|
||||||
|
// >
|
||||||
|
// > jQuery('selector').bind( 'someevent', debounced );
|
||||||
|
// > jQuery('selector').unbind( 'someevent', debounced );
|
||||||
|
//
|
||||||
|
// This also works in jQuery 1.4+:
|
||||||
|
//
|
||||||
|
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
||||||
|
// > jQuery('selector').unbind( 'someevent', callback );
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
//
|
||||||
|
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
||||||
|
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
||||||
|
// at_begin - (Boolean) Optional, defaults to false. If at_begin is false or
|
||||||
|
// unspecified, callback will only be executed `delay` milliseconds after
|
||||||
|
// the last debounced-function call. If at_begin is true, callback will be
|
||||||
|
// executed only at the first debounced-function call. (After the
|
||||||
|
// throttled-function has not been called for `delay` milliseconds, the
|
||||||
|
// internal counter is reset)
|
||||||
|
// callback - (Function) A function to be executed after delay milliseconds.
|
||||||
|
// The `this` context and all arguments are passed through, as-is, to
|
||||||
|
// `callback` when the debounced-function is executed.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
//
|
||||||
|
// (Function) A new, debounced, function.
|
||||||
|
|
||||||
|
$.debounce = function( delay, at_begin, callback ) {
|
||||||
|
return callback === undefined
|
||||||
|
? jq_throttle( delay, at_begin, false )
|
||||||
|
: jq_throttle( delay, callback, at_begin !== false );
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
9
main.css
9
main.css
|
@ -115,13 +115,14 @@ input[type="number"]::-webkit-inner-spin-button {
|
||||||
background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.15));
|
background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.15));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*noinspection CssUnknownTarget*/
|
||||||
#logo {
|
#logo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
float: left;
|
float: left;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
width: 450px;
|
width: 450px;
|
||||||
background: url("images/light-wide-2.svg") no-repeat left center;
|
background: url("../images/light-wide-2.svg") no-repeat left center;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
@ -447,7 +448,7 @@ input[type="number"]::-webkit-inner-spin-button {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
background: url('./images/CF_settings_white.svg') no-repeat -1px -1px;
|
background: url('../images/CF_settings_white.svg') no-repeat -1px -1px;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1469,7 +1470,7 @@ dialog {
|
||||||
.connect_b a.connect {
|
.connect_b a.connect {
|
||||||
border: 1px solid #339cc1;
|
border: 1px solid #339cc1;
|
||||||
background-size: 44px;
|
background-size: 44px;
|
||||||
background: #37a8db url(images/icons/cf_icon_usb2_white.svg) no-repeat center 6px;
|
background: #37a8db url('../images/icons/cf_icon_usb2_white.svg') no-repeat center 6px;
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1479,7 +1480,7 @@ dialog {
|
||||||
|
|
||||||
.connect_b a.connect.active {
|
.connect_b a.connect.active {
|
||||||
border: 1px solid #fe0000;
|
border: 1px solid #fe0000;
|
||||||
background: #e60000 url(images/icons/cf_icon_usb1_white.svg);
|
background: #e60000 url('../images/icons/cf_icon_usb1_white.svg');
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
99
main.html
99
main.html
|
@ -2,103 +2,8 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
<meta name="author" content="cTn"/>
|
<link type="text/css" rel="stylesheet" href="./build/styles.css" media="all"/>
|
||||||
<link type="text/css" rel="stylesheet" href="./main.css" media="all"/>
|
<script type="text/javascript" src="./build/script.js"></script>
|
||||||
<link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.min.css"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.pips.min.css"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./js/libraries/flightindicators.css"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/landing.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/setup.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/help.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/ports.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/configuration.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/pid_tuning.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/receiver.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/servos.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/gps.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/motors.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/led_strip.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/sensors.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/cli.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/logging.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/onboard_logging.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/firmware_flasher.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/adjustments.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/auxiliary.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/failsafe.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/transponder.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/osd.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./tabs/profiles.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./css/opensans_webfontkit/fonts.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./css/dropdown-lists/css/style_lists.css" media="all"/>
|
|
||||||
<link type="text/css" rel="stylesheet" href="./js/libraries/switchery/switchery.css" media="all"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="./js/libraries/jbox/jBox.css"/>
|
|
||||||
<script type="text/javascript" src="./js/libraries/q.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/google-analytics-bundle.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jquery-2.1.4.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jquery-ui-1.11.4.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/d3.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jquery.nouislider.all.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/three/three.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/three/Projector.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/three/CanvasRenderer.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jquery.flightindicators.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/semver.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jbox/jBox.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/switchery/switchery.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/jquery.ba-throttle-debounce.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/inflection.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/libraries/bluebird.min.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/injected_methods.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/intervals.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/timeouts.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/pid_controller.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/simple_smooth_filter.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/walking_average_filter.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/gui.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/msp/MSPCodes.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/msp/MSPHelper.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/msp/MSPchainer.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/port_handler.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/serial.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/model.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/serial_backend.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/data_storage.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/fc.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/msp.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/protocols/stm32.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/protocols/stm32usbdfu.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/localization.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/boards.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/tasks.js"></script>
|
|
||||||
<script type="text/javascript" src="./main.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/landing.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/setup.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/help.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/ports.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/configuration.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/pid_tuning.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/receiver.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/auxiliary.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/adjustments.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/servos.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/gps.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/motors.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/led_strip.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/sensors.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/cli.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/logging.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/onboard_logging.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/firmware_flasher.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/failsafe.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/transponder.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/osd.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/profiles.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/eventFrequencyAnalyzer.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/periodicStatusUpdater.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/serial_queue.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/msp_balanced_interval.js"></script>
|
|
||||||
<script type="text/javascript" src="./tabs/advanced_tuning.js"></script>
|
|
||||||
<title></title>
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -21,6 +21,13 @@
|
||||||
"author": "iNavFlight",
|
"author": "iNavFlight",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nw": "^0.18.0"
|
"nw": "^0.18.0",
|
||||||
|
"openlayers": "^3.20.0",
|
||||||
|
"gulp": "^3.9.1",
|
||||||
|
"gulp-uglify": "^2.0.1",
|
||||||
|
"gulp-concat": "^2.6.1",
|
||||||
|
"gulp-minify-css": "1.2.4",
|
||||||
|
"jquery": "3.1.1",
|
||||||
|
"jquery-ui": "1.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue