mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Merge remote-tracking branch 'cleanflight/development' into GUI-rework
# Conflicts: # main.js # tabs/landing.js
This commit is contained in:
commit
0880343488
24 changed files with 52 additions and 90 deletions
|
@ -1,4 +1,4 @@
|
||||||
<span>2015.10.31 - 0.67.0 - cleanflight</span>
|
<span>2015.10.31 - 1.0.0 - cleanflight</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Major GUI rework.</li>
|
<li>Major GUI rework.</li>
|
||||||
<li>Support flashing of boards that have USB directly connected to MCU. (Device Firmware Update/DFU support).</li>
|
<li>Support flashing of boards that have USB directly connected to MCU. (Device Firmware Update/DFU support).</li>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var CONFIGURATOR = {
|
var CONFIGURATOR = {
|
||||||
'releaseDate': 1446278768375, // new Date().getTime() - Fri Oct 02 2015 20:50:49 GMT+0100 (GMT Daylight Time)
|
'releaseDate': 1447275720339, // new Date().getTime() - Wed Nov 11 2015 21:02:18 GMT+0000 (GMT)
|
||||||
|
|
||||||
// all versions are specified and compared using semantic versioning http://semver.org/
|
// all versions are specified and compared using semantic versioning http://semver.org/
|
||||||
'apiVersionAccepted': '1.2.0',
|
'apiVersionAccepted': '1.2.0',
|
||||||
|
|
30
js/gui.js
30
js/gui.js
|
@ -237,5 +237,35 @@ GUI_control.prototype.tab_switch_cleanup = function (callback) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GUI_control.prototype.content_ready = function (callback) {
|
||||||
|
$('.togglesmall').each(function(index, html) {
|
||||||
|
var switchery = new Switchery(html,
|
||||||
|
{
|
||||||
|
size: 'small',
|
||||||
|
color: '#59aa29',
|
||||||
|
secondaryColor: '#c4c4c4'
|
||||||
|
});
|
||||||
|
|
||||||
|
$(html).removeClass('togglesmall');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.toggle').each(function(index, html) {
|
||||||
|
var switchery = new Switchery(html,
|
||||||
|
{
|
||||||
|
color: '#59aa29',
|
||||||
|
secondaryColor: '#c4c4c4'
|
||||||
|
});
|
||||||
|
|
||||||
|
$(html).removeClass('toggle');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Build link to in-use CF version documentation
|
||||||
|
var documentationButton = $('div#content #button-documentation');
|
||||||
|
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
|
||||||
|
documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion));
|
||||||
|
|
||||||
|
if (callback) callback();
|
||||||
|
}
|
||||||
|
|
||||||
// initialize object into GUI variable
|
// initialize object into GUI variable
|
||||||
var GUI = new GUI_control();
|
var GUI = new GUI_control();
|
||||||
|
|
65
main.js
65
main.js
|
@ -101,66 +101,6 @@ $(document).ready(function () {
|
||||||
|
|
||||||
function content_ready() {
|
function content_ready() {
|
||||||
GUI.tab_switch_in_progress = false;
|
GUI.tab_switch_in_progress = false;
|
||||||
|
|
||||||
$('.togglesmall').each(function(index, html) {
|
|
||||||
var switchery = new Switchery(html,
|
|
||||||
{
|
|
||||||
size: 'small',
|
|
||||||
color: '#59aa29',
|
|
||||||
secondaryColor: '#c4c4c4'
|
|
||||||
});
|
|
||||||
|
|
||||||
$(html).removeClass('togglesmall');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.toggle').each(function(index, html) {
|
|
||||||
var switchery = new Switchery(html,
|
|
||||||
{
|
|
||||||
color: '#59aa29',
|
|
||||||
secondaryColor: '#c4c4c4'
|
|
||||||
});
|
|
||||||
|
|
||||||
$(html).removeClass('toggle');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.togglemedium').each(function(index, html) {
|
|
||||||
var switchery = new Switchery(html,
|
|
||||||
{
|
|
||||||
className: 'switcherymid',
|
|
||||||
color: '#59aa29',
|
|
||||||
secondaryColor: '#c4c4c4'
|
|
||||||
});
|
|
||||||
|
|
||||||
$(html).removeClass('togglemedium');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// loading tooltip
|
|
||||||
jQuery(document).ready(function($) {
|
|
||||||
$('cf_tip').each(function() { // Grab all ".cf_tip" elements, and for each...
|
|
||||||
log(this); // ...print out "this", which now refers to each ".cf_tip" DOM element
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.cf_tip').each(function() {
|
|
||||||
$(this).jBox('Tooltip', {
|
|
||||||
content: $(this).children('.cf_tooltiptext'),
|
|
||||||
delayOpen: 100,
|
|
||||||
delayClose: 100,
|
|
||||||
position: {
|
|
||||||
x: 'right',
|
|
||||||
y: 'center'
|
|
||||||
},
|
|
||||||
outside: 'x'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Build link to in-use CF version documentation
|
|
||||||
var documentationButton = $('div#content #button-documentation');
|
|
||||||
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
|
|
||||||
documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tab) {
|
switch (tab) {
|
||||||
|
@ -449,8 +389,3 @@ $("#showlog").on('click', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// loading tooltip PLACEHOLDER
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"minimum_chrome_version": "38",
|
"minimum_chrome_version": "38",
|
||||||
"version": "0.67.0",
|
"version": "1.0.0",
|
||||||
"author": "Hydra",
|
"author": "Hydra",
|
||||||
"name": "Cleanflight - Configurator",
|
"name": "Cleanflight - Configurator",
|
||||||
"short_name": "cleanflight",
|
"short_name": "cleanflight",
|
||||||
|
|
|
@ -277,7 +277,7 @@ TABS.adjustments.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ TABS.auxiliary.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ TABS.cli.initialize = function (callback) {
|
||||||
// give input element user focus
|
// give input element user focus
|
||||||
textarea.focus();
|
textarea.focus();
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -453,7 +453,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ TABS.dataflash.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IO related methods
|
// IO related methods
|
||||||
|
|
|
@ -516,7 +516,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ TABS.gps.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ TABS.help.initialize = function (callback) {
|
||||||
$('#content').load("./tabs/help.html", function () {
|
$('#content').load("./tabs/help.html", function () {
|
||||||
localize();
|
localize();
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,7 @@ TABS.landing.initialize = function (callback) {
|
||||||
$(this).data('state2', state);
|
$(this).data('state2', state);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -288,7 +288,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function findLed(x, y) {
|
function findLed(x, y) {
|
||||||
|
|
|
@ -110,7 +110,7 @@ TABS.logging.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_head() {
|
function print_head() {
|
||||||
|
|
|
@ -149,7 +149,7 @@ TABS.modes.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -450,7 +450,7 @@ TABS.motors.initialize = function (callback) {
|
||||||
// enable Status and Motor data pulling
|
// enable Status and Motor data pulling
|
||||||
GUI.interval_add('motor_and_status_pull', get_status, 50, true);
|
GUI.interval_add('motor_and_status_pull', get_status, 50, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -388,9 +388,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) {
|
GUI.content_ready(callback);
|
||||||
callback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function on_save_handler() {
|
function on_save_handler() {
|
||||||
|
|
|
@ -458,7 +458,7 @@ TABS.receiver.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -448,7 +448,7 @@ TABS.sensors.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ TABS.servos.initialize = function (callback) {
|
||||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||||
}, 250, true);
|
}, 250, true);
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ TABS.setup.initialize = function (callback) {
|
||||||
GUI.interval_add('setup_data_pull_fast', get_fast_data, 33, true); // 30 fps
|
GUI.interval_add('setup_data_pull_fast', get_fast_data, 33, true); // 30 fps
|
||||||
GUI.interval_add('setup_data_pull_slow', get_slow_data, 250, true); // 4 fps
|
GUI.interval_add('setup_data_pull_slow', get_slow_data, 250, true); // 4 fps
|
||||||
|
|
||||||
if (callback) callback();
|
GUI.content_ready(callback);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue