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