Merge remote-tracking branch 'upstream/new_stuff' into gps
commit
e0baea68b7
|
@ -1,7 +1,7 @@
|
|||
<span>2015.11.14 - 1.1.0 - cleanflight</span>
|
||||
<span>2015.11.28 - 1.1.0 - cleanflight</span>
|
||||
<ul>
|
||||
<li>Support Cleanflight API 1.14.0.</li>
|
||||
<li>Minor GUI cleanups and fixes.</li>
|
||||
<li>GUI cleanups and fixes.</li>
|
||||
</ul>
|
||||
|
||||
<span>2015.11.11 - 1.0.0 - cleanflight</span>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var CONFIGURATOR = {
|
||||
'releaseDate': 1447275720339, // new Date().getTime() - Wed Nov 11 2015 21:02:18 GMT+0000 (GMT)
|
||||
'releaseDate': 1448724175378, // new Date().getTime() - Sat Nov 28 2015 15:22:51 GMT+0000 (GMT Standard Time)
|
||||
|
||||
// all versions are specified and compared using semantic versioning http://semver.org/
|
||||
'apiVersionAccepted': '1.2.0',
|
||||
|
|
59
js/gui.js
59
js/gui.js
|
@ -24,14 +24,14 @@ var GUI_control = function () {
|
|||
'configuration',
|
||||
'gps',
|
||||
'led_strip',
|
||||
'logging',
|
||||
'logging',
|
||||
'dataflash',
|
||||
'modes',
|
||||
'motors',
|
||||
'pid_tuning',
|
||||
'ports',
|
||||
'receiver',
|
||||
'sensors',
|
||||
'sensors',
|
||||
'servos',
|
||||
'setup'
|
||||
];
|
||||
|
@ -238,39 +238,42 @@ 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,
|
||||
{
|
||||
|
||||
$('.togglesmall').each(function(index, elem) {
|
||||
var switchery = new Switchery(elem, {
|
||||
size: 'small',
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
});
|
||||
|
||||
$(html).removeClass('togglesmall');
|
||||
$(elem).on("change", function (evt) {
|
||||
switchery.setPosition();
|
||||
});
|
||||
$(elem).removeClass('togglesmall');
|
||||
});
|
||||
|
||||
$('.toggle').each(function(index, html) {
|
||||
var switchery = new Switchery(html,
|
||||
{
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
$('.toggle').each(function(index, elem) {
|
||||
var switchery = new Switchery(elem, {
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
});
|
||||
|
||||
$(html).removeClass('toggle');
|
||||
$(elem).on("change", function (evt) {
|
||||
switchery.setPosition();
|
||||
});
|
||||
$(elem).removeClass('toggle');
|
||||
});
|
||||
|
||||
$('.togglemedium').each(function(index, html) {
|
||||
var switchery = new Switchery(html,
|
||||
{
|
||||
$('.togglemedium').each(function(index, elem) {
|
||||
var switchery = new Switchery(elem, {
|
||||
className: 'switcherymid',
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
color: '#59aa29',
|
||||
secondaryColor: '#c4c4c4'
|
||||
});
|
||||
|
||||
$(html).removeClass('togglemedium');
|
||||
$(elem).on("change", function (evt) {
|
||||
switchery.setPosition();
|
||||
});
|
||||
$(elem).removeClass('togglemedium');
|
||||
});
|
||||
|
||||
|
||||
// Build link to in-use CF version documentation
|
||||
var documentationButton = $('div#content #button-documentation');
|
||||
documentationButton.html("Documentation for "+CONFIG.flightControllerVersion);
|
||||
|
@ -279,12 +282,12 @@ GUI_control.prototype.content_ready = function (callback) {
|
|||
// 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
|
||||
log(this); // ...print out "this", which now refers to each ".cf_tip" DOM element
|
||||
});
|
||||
|
||||
$('.cf_tip').each(function() {
|
||||
$('.cf_tip').each(function() {
|
||||
$(this).jBox('Tooltip', {
|
||||
content: $(this).children('.cf_tooltiptext'),
|
||||
content: $(this).children('.cf_tooltiptext'),
|
||||
delayOpen: 100,
|
||||
delayClose: 100,
|
||||
position: {
|
||||
|
|
|
@ -8,11 +8,11 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
GUI.active_tab = 'firmware_flasher';
|
||||
googleAnalytics.sendAppView('Firmware Flasher');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var intel_hex = false, // standard intel hex in string format
|
||||
parsed_hex = false; // parsed raw hex in array format
|
||||
|
||||
|
||||
$('#content').load("./tabs/firmware_flasher.html", function () {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
@ -137,7 +137,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
$.get('https://api.github.com/repos/cleanflight/cleanflight/releases', function (releases){
|
||||
processReleases(releases);
|
||||
TABS.firmware_flasher.releases = releases;
|
||||
|
||||
|
||||
// bind events
|
||||
$('select[name="release"]').change(function() {
|
||||
if (!GUI.connect_lock) {
|
||||
|
@ -155,7 +155,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
}
|
||||
$('select[name="release"]').empty().append('<option value="0">Offline</option>');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// UI Hooks
|
||||
$('a.load_file').click(function () {
|
||||
|
@ -221,7 +221,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
$("a.load_remote_file").removeClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('a.load_remote_file').click(function (evt) {
|
||||
|
||||
if ($('select[name="release"]').val() == "0") {
|
||||
|
@ -249,34 +249,34 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
d = new Date(data.commit.author.date),
|
||||
offset = d.getTimezoneOffset() / 60,
|
||||
date;
|
||||
|
||||
|
||||
date = d.getFullYear() + '.' + ('0' + (d.getMonth() + 1)).slice(-2) + '.' + ('0' + (d.getDate())).slice(-2);
|
||||
date += ' @ ' + ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2);
|
||||
date += (offset > 0) ? ' GMT+' + offset : ' GMT' + offset;
|
||||
|
||||
|
||||
$('div.git_info .committer').text(data.commit.author.name);
|
||||
$('div.git_info .date').text(date);
|
||||
$('div.git_info .hash').text(data.sha.slice(0, 7)).prop('href', 'https://github.com/cleanflight/cleanflight/commit/' + data.sha);
|
||||
|
||||
|
||||
$('div.git_info .message').text(data.commit.message);
|
||||
|
||||
|
||||
$('div.git_info').slideDown();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$('div.release_info .target').text(summary.target);
|
||||
|
||||
|
||||
var status_e = $('div.release_info .status');
|
||||
if (summary.status == 'release-candidate') {
|
||||
$('div.release_info .status').html(chrome.i18n.getMessage('firmwareFlasherReleaseStatusReleaseCandidate')).show();
|
||||
} else {
|
||||
status_e.hide();
|
||||
}
|
||||
|
||||
|
||||
$('div.release_info .name').text(summary.name).prop('href', summary.releaseUrl);
|
||||
$('div.release_info .date').text(summary.date);
|
||||
$('div.release_info .file').text(summary.file).prop('href', summary.url);
|
||||
|
||||
|
||||
var formattedNotes = summary.notes.trim('\r').replace(/\r/g, '<br />');
|
||||
$('div.release_info .notes').html(formattedNotes);
|
||||
|
||||
|
@ -303,7 +303,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware'));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('a.flash_firmware').click(function () {
|
||||
if (!$(this).hasClass('disabled')) {
|
||||
if (!GUI.connect_lock) { // button disabled while flashing is in progress
|
||||
|
@ -424,6 +424,8 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
|
||||
chrome.storage.local.set({'no_reboot_sequence': status});
|
||||
});
|
||||
|
||||
$('input.updating').change();
|
||||
});
|
||||
|
||||
chrome.storage.local.get('flash_manual_baud', function (result) {
|
||||
|
@ -436,22 +438,21 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
// bind UI hook so the status is saved on change
|
||||
$('input.flash_manual_baud').change(function() {
|
||||
var status = $(this).is(':checked');
|
||||
|
||||
chrome.storage.local.set({'flash_manual_baud': status});
|
||||
});
|
||||
|
||||
|
||||
$('input.flash_manual_baud').change();
|
||||
});
|
||||
|
||||
chrome.storage.local.get('flash_manual_baud_rate', function (result) {
|
||||
$('#flash_manual_baud_rate').val(result.flash_manual_baud_rate);
|
||||
|
||||
|
||||
// bind UI hook so the status is saved on change
|
||||
$('#flash_manual_baud_rate').change(function() {
|
||||
var baud = parseInt($('#flash_manual_baud_rate').val());
|
||||
chrome.storage.local.set({'flash_manual_baud_rate': baud});
|
||||
});
|
||||
|
||||
|
||||
$('input.flash_manual_baud_rate').change();
|
||||
});
|
||||
|
||||
|
@ -507,6 +508,9 @@ TABS.firmware_flasher.initialize = function (callback) {
|
|||
$('input.erase_chip').change(function () {
|
||||
chrome.storage.local.set({'erase_chip': $(this).is(':checked')});
|
||||
});
|
||||
|
||||
$('input.erase_chip').change();
|
||||
|
||||
});
|
||||
|
||||
$(document).keypress(function (e) {
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<li><a href="http://www.scorpionsystem.com" title="www.scorpionsystem.com" target="_blank">Scorpion
|
||||
Power Systems</a></li>
|
||||
<li><a href="http://www.multigp.com" title="www.multigp.com" target="_blank">MultiGP</a></li>
|
||||
<li><a href="makeitbuildit.co.uk" title="makeitbuildit.co.uk" target="_blank">MakeItBuildIt</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -69,8 +69,6 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
|||
MSP.send_message(MSP_codes.MSP_CF_SERIAL_CONFIG, false, false, on_configuration_loaded_handler);
|
||||
|
||||
function on_configuration_loaded_handler() {
|
||||
console.log(SERIAL_CONFIG.ports);
|
||||
|
||||
$('#content').load("./tabs/ports.html", on_tab_loaded_handler);
|
||||
|
||||
board_definition = BOARD.find_board_definition(CONFIG.boardIdentifier);
|
||||
|
|
|
@ -183,7 +183,7 @@ TABS.receiver.initialize = function (callback) {
|
|||
// rssi
|
||||
var rssi_channel_e = $('select[name="rssi_channel"]');
|
||||
rssi_channel_e.append('<option value="0">Disabled</option>');
|
||||
for (var i = 0; i < RC.active_channels; i++) {
|
||||
for (var i = 1; i < RC.active_channels + 1; i++) {
|
||||
rssi_channel_e.append('<option value="' + i + '">' + i + '</option>');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue