mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-16 21:05:28 +03:00
Merge remote-tracking branch 'multiwii/master'
Conflicts: _locales/en/messages.json changelog.html js/data_storage.js js/protocols/stm32.js manifest.json tabs/auxiliary_configuration.js tabs/default.css tabs/default.html tabs/firmware_flasher.js tabs/servos.js
This commit is contained in:
commit
bf13a11dc2
11 changed files with 110 additions and 67 deletions
|
@ -136,7 +136,7 @@
|
||||||
"message": "Request Optional Permissions"
|
"message": "Request Optional Permissions"
|
||||||
},
|
},
|
||||||
"defaultWelcomeText": {
|
"defaultWelcomeText": {
|
||||||
"message": "This application is a configuration utility for cleanflight, a 32 bit fork of the popular open source RC flight control firmware project <a href=\"http://www.multiwii.org/\" title=\"www.multiwii.org\" target=\"_blank\">MultiWii</a>.<br /><br />Application supports hardware that run cleanflight (acro naze, naze, afromini, flip32, flip32+, chebuzz f3, stm32f3discovery, naze32pro, etc)<br /><br />The firmware source code can be downloaded from <a href=\"https://github.com/hydra/cleanflight\" title=\"www.github.com\" target=\"_blank\">here</a><br />The newest binary firmware image is available <a href=\"https://github.com/hydra/cleanflight/tree/master/obj\" title=\"www.github.com\" target=\"_blank\">here</a><br /><br />Latest <strong>CP210x Drivers</strong> can be downloaded from <a href=\"http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx\" title=\"http://www.silabs.com/\" target=\"_blank\">here</a><br />"
|
"message": "Welcome to <strong>Cleanflight - Configurator</strong>, utility designed to simplify updating, configuring and tuning of your flight controller.<br /><br />Application supports hardware that run cleanflight (acro naze, naze, afromini, flip32, flip32+, chebuzz f3, stm32f3discovery, naze32pro, etc)<br /><br />The firmware source code can be downloaded from <a href=\"https://github.com/hydra/cleanflight\" title=\"www.github.com\" target=\"_blank\">here</a><br />The newest binary firmware image is available <a href=\"https://github.com/hydra/cleanflight/tree/master/obj\" title=\"www.github.com\" target=\"_blank\">here</a><br /><br />Latest <strong>CP210x Drivers</strong> can be downloaded from <a href=\"http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx\" title=\"http://www.silabs.com/\" target=\"_blank\">here</a><br />"
|
||||||
},
|
},
|
||||||
"defaultChangelogHead": {
|
"defaultChangelogHead": {
|
||||||
"message": "Configurator - Changelog"
|
"message": "Configurator - Changelog"
|
||||||
|
@ -524,7 +524,7 @@
|
||||||
"message": "Progress:"
|
"message": "Progress:"
|
||||||
},
|
},
|
||||||
"firmwareFlasherNote": {
|
"firmwareFlasherNote": {
|
||||||
"message": "If you are flashing board with bootloader pins <strong>shorted/connected</strong>, check <strong>No reboot sequence</strong>.<br />If you want configuration data to be wiped, check <strong>Full Chip Erase</strong><br />"
|
"message": "If you are flashing board with bootloader pins <strong>shorted/connected</strong>, check <strong>No reboot sequence</strong>.<br />If you want configuration data to be wiped, check <strong>Full Chip Erase</strong><br />If you are flashing via bluetooth adapter or using external usb to serial adapter, check <strong>Flash slowly</strong><br />"
|
||||||
},
|
},
|
||||||
"firmwareFlasherNoReboot": {
|
"firmwareFlasherNoReboot": {
|
||||||
"message": "No reboot sequence"
|
"message": "No reboot sequence"
|
||||||
|
@ -535,6 +535,12 @@
|
||||||
"firmwareFlasherFullChipErase": {
|
"firmwareFlasherFullChipErase": {
|
||||||
"message": "Full Chip Erase"
|
"message": "Full Chip Erase"
|
||||||
},
|
},
|
||||||
|
"firmwareFlasherFlashSlowly": {
|
||||||
|
"message": "Flash slowly"
|
||||||
|
},
|
||||||
|
"firmwareFlasherFlashSlowlyTitle": {
|
||||||
|
"message": "Use 115200 baudrate for flashing"
|
||||||
|
},
|
||||||
"firmwareFlasherButtonLoadLocal": {
|
"firmwareFlasherButtonLoadLocal": {
|
||||||
"message": "Load Firmware [Local]"
|
"message": "Load Firmware [Local]"
|
||||||
},
|
},
|
||||||
|
@ -566,19 +572,16 @@
|
||||||
"message": "Leave Firmware Flasher"
|
"message": "Leave Firmware Flasher"
|
||||||
},
|
},
|
||||||
"firmwareFlasherFirmwareNotLoaded": {
|
"firmwareFlasherFirmwareNotLoaded": {
|
||||||
"message": "<span style=\"color: red\">Firmware not loaded</span>"
|
"message": "Firmware not loaded"
|
||||||
},
|
|
||||||
"firmwareFlasherLocalFirmwareLoaded": {
|
|
||||||
"message": "<span style=\"color: green\">Local Firmware loaded, ready for flashing</span>"
|
|
||||||
},
|
},
|
||||||
"firmwareFlasherHexCorrupted": {
|
"firmwareFlasherHexCorrupted": {
|
||||||
"message": "<span style=\"color: red\">HEX file appears to be corrupted</span>"
|
"message": "HEX file appears to be corrupted"
|
||||||
},
|
},
|
||||||
"firmwareFlasherRemoteFirmwareLoaded": {
|
"firmwareFlasherRemoteFirmwareLoaded": {
|
||||||
"message": "<span style=\"color: green\">Remote Firmware loaded, ready for flashing</span>"
|
"message": "<span style=\"color: green\">Remote Firmware loaded, ready for flashing</span>"
|
||||||
},
|
},
|
||||||
"firmwareFlasherFailedToLoadOnlineFirmware": {
|
"firmwareFlasherFailedToLoadOnlineFirmware": {
|
||||||
"message": "<span style=\"color: red\">Failed to load remote firmware</span>"
|
"message": "Failed to load remote firmware"
|
||||||
},
|
},
|
||||||
"firmwareFlasherWaitForFinish": {
|
"firmwareFlasherWaitForFinish": {
|
||||||
"message": "You <span style=\"color: red\">can't</span> do this right now, please wait for current operation to finish ..."
|
"message": "You <span style=\"color: red\">can't</span> do this right now, please wait for current operation to finish ..."
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<span>08.25.2014 - 0.49.2 cleanflight</span>
|
<span>08.31.2014 - 0.50</span>
|
||||||
<p>
|
<p>
|
||||||
- Disable sponsors panel.
|
- Small UI revamp for Firmware Flasher<br />
|
||||||
|
- Added "Flash slowly" mode (bluetooth friendly)<br />
|
||||||
|
- Bugfixes<br />
|
||||||
</p>
|
</p>
|
||||||
<span>08.25.2014 - 0.49.1 cleanflight</span>
|
<span>08.25.2014 - 0.49.1 cleanflight</span>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var CONFIGURATOR = {
|
var CONFIGURATOR = {
|
||||||
'releaseDate': 1408379746980, // 08.18.2014 - new Date().getTime()
|
'releaseDate': 1409496670288, // 08.31.2014 - new Date().getTime()
|
||||||
'firmwareVersionAccepted': 2.3,
|
'firmwareVersionAccepted': 2.3,
|
||||||
'connectionValid': false,
|
'connectionValid': false,
|
||||||
'mspPassThrough': false,
|
'mspPassThrough': false,
|
||||||
|
|
|
@ -256,7 +256,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
case 2:
|
case 2:
|
||||||
// full chip erase
|
// full chip erase
|
||||||
console.log('Executing global chip erase');
|
console.log('Executing global chip erase');
|
||||||
GUI.log('Erasing ...');
|
$('span.progressLabel').text('Erasing ...');
|
||||||
|
|
||||||
self.controlTransfer('out', self.request.DNLOAD, 0, 0, 0, [0x41], function () {
|
self.controlTransfer('out', self.request.DNLOAD, 0, 0, 0, [0x41], function () {
|
||||||
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) {
|
||||||
|
@ -284,7 +284,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
// upload
|
// upload
|
||||||
// we dont need to clear the state as we are already using DFU_DNLOAD
|
// we dont need to clear the state as we are already using DFU_DNLOAD
|
||||||
console.log('Writing data ...');
|
console.log('Writing data ...');
|
||||||
GUI.log('Flashing ...');
|
$('span.progressLabel').text('Flashing ...');
|
||||||
|
|
||||||
var blocks = self.hex.data.length - 1;
|
var blocks = self.hex.data.length - 1;
|
||||||
var flashing_block = 0;
|
var flashing_block = 0;
|
||||||
|
@ -355,7 +355,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
case 5:
|
case 5:
|
||||||
// verify
|
// verify
|
||||||
console.log('Verifying data ...');
|
console.log('Verifying data ...');
|
||||||
GUI.log('Verifying ...');
|
$('span.progressLabel').text('Verifying ...');
|
||||||
|
|
||||||
var blocks = self.hex.data.length - 1;
|
var blocks = self.hex.data.length - 1;
|
||||||
var reading_block = 0;
|
var reading_block = 0;
|
||||||
|
@ -422,7 +422,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
|
|
||||||
if (verify) {
|
if (verify) {
|
||||||
console.log('Programming: SUCCESSFUL');
|
console.log('Programming: SUCCESSFUL');
|
||||||
GUI.log('Programming: <strong style="color: green">SUCCESSFUL</strong>');
|
$('span.progressLabel').text('Programming: SUCCESSFUL');
|
||||||
googleAnalytics.sendEvent('Flashing', 'Programming', 'success');
|
googleAnalytics.sendEvent('Flashing', 'Programming', 'success');
|
||||||
|
|
||||||
// update progress bar
|
// update progress bar
|
||||||
|
@ -432,7 +432,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
|
||||||
self.upload_procedure(6);
|
self.upload_procedure(6);
|
||||||
} else {
|
} else {
|
||||||
console.log('Programming: FAILED');
|
console.log('Programming: FAILED');
|
||||||
GUI.log('Programming: <strong style="color: red">FAILED</strong>');
|
$('span.progressLabel').text('Programming: FAILED');
|
||||||
googleAnalytics.sendEvent('Flashing', 'Programming', 'fail');
|
googleAnalytics.sendEvent('Flashing', 'Programming', 'fail');
|
||||||
|
|
||||||
// update progress bar
|
// update progress bar
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"minimum_chrome_version": "36",
|
"minimum_chrome_version": "36",
|
||||||
"version": "0.49.2",
|
"version": "0.50",
|
||||||
|
|
||||||
"author": "Hydra",
|
"author": "Hydra",
|
||||||
"name": "Cleanflight - Configurator",
|
"name": "Cleanflight - Configurator",
|
||||||
"short_name": "cleanflight",
|
"short_name": "cleanflight",
|
||||||
|
|
|
@ -125,7 +125,7 @@ TABS.auxiliary_configuration.initialize = function (callback) {
|
||||||
AUX_val_buffer_out.push(highByte((AUX_CONFIG_values[i] >> 16) & 0xFFF));
|
AUX_val_buffer_out.push(highByte((AUX_CONFIG_values[i] >> 16) & 0xFFF));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSP.send_message(MSP_codes.MSP_SET_BOX, AUX_val_buffer_out, false, save_to_eeprom);
|
MSP.send_message(MSP_codes.MSP_SET_BOX, AUX_val_buffer_out, false, save_to_eeprom);
|
||||||
|
|
||||||
function save_to_eeprom() {
|
function save_to_eeprom() {
|
||||||
|
|
|
@ -146,9 +146,6 @@
|
||||||
.firmware_flasher:hover {
|
.firmware_flasher:hover {
|
||||||
background-color: #dedcdc;
|
background-color: #dedcdc;
|
||||||
}
|
}
|
||||||
.tab-default .sponsors {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.tab-default .sponsors {
|
.tab-default .sponsors {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
border: 1px solid silver;
|
border: 1px solid silver;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="title" i18n="defaultDonateHead"></div>
|
<div class="title" i18n="defaultDonateHead"></div>
|
||||||
<p i18n="defaultDonateText">
|
<p i18n="defaultDonateText">
|
||||||
</p>
|
</p>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<ul>
|
<ul>
|
||||||
<li><p i18n="defaultDonateFirmwareText"></p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TSQKVT6UYKGL6" target="_blank" title="Donate for cleanflight firmware"><img src="./images/btn_donate_SM.gif" alt="Paypal" /></a></li>
|
<li><p i18n="defaultDonateFirmwareText"></p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TSQKVT6UYKGL6" target="_blank" title="Donate for cleanflight firmware"><img src="./images/btn_donate_SM.gif" alt="Paypal" /></a></li>
|
||||||
<li><p i18n="defaultDonateConfiguratorText"></p><a href="http://goo.gl/xQMKN" target="_blank" title="Donate for configurator"><img src="./images/btn_donate_SM.gif" alt="Paypal" /></a></li>
|
<li><p i18n="defaultDonateConfiguratorText"></p><a href="http://goo.gl/xQMKN" target="_blank" title="Donate for configurator"><img src="./images/btn_donate_SM.gif" alt="Paypal" /></a></li>
|
||||||
|
@ -21,8 +21,7 @@
|
||||||
<div class="sponsors">
|
<div class="sponsors">
|
||||||
<div class="title">Sponsors</div>
|
<div class="title">Sponsors</div>
|
||||||
<p>
|
<p>
|
||||||
• <a href="http://www.abusemark.com/store/" title="www.abusemark.com" target="_blank">AbuseMark</a><br />
|
• <a href="http://www.massiverc.com" title="www.massiverc.com" target="_blank">MassiveRC</a><br />
|
||||||
• <a href="http://www.multirotorsuperstore.com/" title="www.multirotorsuperstore.com" target="_blank">Multirotor Superstore</a><br />
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,22 +1,50 @@
|
||||||
.tab-firmware_flasher .info {
|
.tab-firmware_flasher .info {
|
||||||
margin: 0 0 10px 0;
|
margin: 0 0 10px 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.tab-firmware_flasher .info strong {
|
.tab-firmware_flasher .info .progressLabel {
|
||||||
margin-right: 5px;
|
position: absolute;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 26px;
|
||||||
|
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
/* text-shadow: 1px 0px 2px rgba(0, 0, 0, 0.9);*/
|
||||||
}
|
}
|
||||||
.tab-firmware_flasher .info .progress {
|
.tab-firmware_flasher .info .progress {
|
||||||
width: 25%;
|
width: 100%;
|
||||||
|
height: 26px;
|
||||||
|
|
||||||
border: 1px solid silver;
|
border: 1px solid silver;
|
||||||
}
|
}
|
||||||
.tab-firmware_flasher .info .progress::-webkit-progress-value {
|
.tab-firmware_flasher .info .progress {
|
||||||
background-color: #f4af4d;
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
|
.tab-firmware_flasher .info .progress::-webkit-progress-bar {
|
||||||
|
background-color: #343434;
|
||||||
|
}
|
||||||
|
.tab-firmware_flasher .info .progress::-webkit-progress-value {
|
||||||
|
background-color: #F86008;
|
||||||
|
}
|
||||||
|
.tab-firmware_flasher .info .progress.valid::-webkit-progress-bar {
|
||||||
|
background-color: #73BE45;
|
||||||
|
}
|
||||||
.tab-firmware_flasher .info .progress.valid::-webkit-progress-value {
|
.tab-firmware_flasher .info .progress.valid::-webkit-progress-value {
|
||||||
background-color: #43c232;
|
background-color: #73BE45;
|
||||||
|
}
|
||||||
|
.tab-firmware_flasher .info .progress.invalid::-webkit-progress-bar {
|
||||||
|
background-color: #A62E32;
|
||||||
}
|
}
|
||||||
.tab-firmware_flasher .info .progress.invalid::-webkit-progress-value {
|
.tab-firmware_flasher .info .progress.invalid::-webkit-progress-value {
|
||||||
background-color: #cf2222;
|
background-color: #A62E32;
|
||||||
}
|
}
|
||||||
.tab-firmware_flasher .note {
|
.tab-firmware_flasher .note {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<div class="tab-firmware_flasher">
|
<div class="tab-firmware_flasher">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<strong i18n="firmwareFlasherPath"></strong><span class="path">empty</span><br />
|
<progress class="progress" value="0" min="0" max="100"></progress>
|
||||||
<strong i18n="firmwareFlasherSize"></strong><span class="size">0 bytes</span><br />
|
<span class="progressLabel">Please load firmware file</span>
|
||||||
<strong i18n="firmwareFlasherProgress"></strong><progress class="progress" value="0" min="0" max="100"></progress>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="note">
|
<div class="note">
|
||||||
<p i18n="firmwareFlasherNote">
|
<p i18n="firmwareFlasherNote">
|
||||||
|
@ -22,6 +21,11 @@
|
||||||
<span i18n="firmwareFlasherFullChipErase"></span>
|
<span i18n="firmwareFlasherFullChipErase"></span>
|
||||||
</label>
|
</label>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
|
<label i18n_title="firmwareFlasherFlashSlowlyTitle">
|
||||||
|
<input class="flash_slowly" type="checkbox" />
|
||||||
|
<span i18n="firmwareFlasherFlashSlowly"></span>
|
||||||
|
</label>
|
||||||
|
<div class="clear-both"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div class="git_info">
|
<div class="git_info">
|
||||||
|
|
|
@ -6,8 +6,8 @@ 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
|
||||||
var 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
|
||||||
|
@ -27,7 +27,6 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
|
|
||||||
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
|
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
|
||||||
console.log('Loading file from: ' + path);
|
console.log('Loading file from: ' + path);
|
||||||
$('span.path').html(path);
|
|
||||||
|
|
||||||
fileEntry.file(function (file) {
|
fileEntry.file(function (file) {
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
|
@ -50,13 +49,12 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
parsed_hex = data;
|
parsed_hex = data;
|
||||||
|
|
||||||
if (parsed_hex) {
|
if (parsed_hex) {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherLocalFirmwareLoaded'));
|
|
||||||
googleAnalytics.sendEvent('Flashing', 'Firmware', 'local');
|
googleAnalytics.sendEvent('Flashing', 'Firmware', 'local');
|
||||||
$('a.flash_firmware').removeClass('locked');
|
$('a.flash_firmware').removeClass('locked');
|
||||||
|
|
||||||
$('span.size').html(parsed_hex.bytes_total + ' bytes');
|
$('span.progressLabel').text('Loaded Local Firmware: (' + parsed_hex.bytes_total + ' bytes)');
|
||||||
} else {
|
} else {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
|
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -68,41 +66,39 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.load_remote_file').click(function() {
|
$('a.load_remote_file').click(function () {
|
||||||
$.get('https://raw.githubusercontent.com/hydra/cleanflight/master/obj/cleanflight_NAZE.hex', function (data) {
|
$.get('https://raw.githubusercontent.com/multiwii/baseflight/master/obj/baseflight.hex', function (data) {
|
||||||
intel_hex = data;
|
intel_hex = data;
|
||||||
|
|
||||||
parse_hex(intel_hex, function (data) {
|
parse_hex(intel_hex, function (data) {
|
||||||
parsed_hex = data;
|
parsed_hex = data;
|
||||||
|
|
||||||
if (parsed_hex) {
|
if (parsed_hex) {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded'));
|
|
||||||
googleAnalytics.sendEvent('Flashing', 'Firmware', 'online');
|
googleAnalytics.sendEvent('Flashing', 'Firmware', 'online');
|
||||||
|
$('span.progressLabel').text('Loaded Online Firmware: (' + parsed_hex.bytes_total + ' bytes)');
|
||||||
$('a.flash_firmware').removeClass('locked');
|
$('a.flash_firmware').removeClass('locked');
|
||||||
|
|
||||||
$('span.path').text('Using remote Firmware');
|
$.get('https://api.github.com/repos/multiwii/baseflight/commits?page=1&per_page=1&path=obj/baseflight.hex', function (data) {
|
||||||
$('span.size').text(parsed_hex.bytes_total + ' bytes');
|
var data = data[0],
|
||||||
|
d = new Date(data.commit.author.date),
|
||||||
|
date = ('0' + (d.getMonth() + 1)).slice(-2) + '.' + ('0' + (d.getDate() + 1)).slice(-2) + '.' + d.getFullYear();
|
||||||
|
|
||||||
|
date += ' @ ' + ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2);
|
||||||
|
|
||||||
|
$('div.git_info .committer').text(data.commit.author.name);
|
||||||
|
$('div.git_info .date').text(date);
|
||||||
|
$('div.git_info .message').text(data.commit.message);
|
||||||
|
|
||||||
|
$('div.git_info').slideDown();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
|
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherHexCorrupted'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware'));
|
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware'));
|
||||||
$('a.flash_firmware').addClass('locked');
|
$('a.flash_firmware').addClass('locked');
|
||||||
});
|
});
|
||||||
|
|
||||||
$.get('https://api.github.com/repos/hydra/cleanflight/commits?page=1&per_page=1&path=obj/cleanflight_NAZE.hex', function (data) {
|
|
||||||
var data = data[0];
|
|
||||||
var d = new Date(data.commit.author.date);
|
|
||||||
var date = ('0' + (d.getMonth() + 1)).slice(-2) + '.' + ('0' + (d.getDate() + 1)).slice(-2) + '.' + d.getFullYear();
|
|
||||||
date += ' @ ' + ('0' + d.getHours()).slice(-2) + ':' + ('0' + d.getMinutes()).slice(-2);
|
|
||||||
|
|
||||||
$('div.git_info .committer').text(data.commit.author.name);
|
|
||||||
$('div.git_info .date').text(date);
|
|
||||||
$('div.git_info .message').text(data.commit.message);
|
|
||||||
|
|
||||||
$('div.git_info').slideDown();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('a.flash_firmware').click(function () {
|
$('a.flash_firmware').click(function () {
|
||||||
|
@ -111,9 +107,9 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
if (parsed_hex != false) {
|
if (parsed_hex != false) {
|
||||||
if (String($('div#port-picker #port').val()) != 'DFU') {
|
if (String($('div#port-picker #port').val()) != 'DFU') {
|
||||||
if (String($('div#port-picker #port').val()) != '0') {
|
if (String($('div#port-picker #port').val()) != '0') {
|
||||||
var options = {};
|
var options = {},
|
||||||
var port = String($('div#port-picker #port').val());
|
port = String($('div#port-picker #port').val()),
|
||||||
var baud;
|
baud;
|
||||||
|
|
||||||
switch (GUI.operating_system) {
|
switch (GUI.operating_system) {
|
||||||
case 'Windows':
|
case 'Windows':
|
||||||
|
@ -138,6 +134,10 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
options.erase_chip = true;
|
options.erase_chip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($('input.flash_slowly').is(':checked')) {
|
||||||
|
options.flash_slowly = true;
|
||||||
|
}
|
||||||
|
|
||||||
STM32.connect(port, baud, parsed_hex, options);
|
STM32.connect(port, baud, parsed_hex, options);
|
||||||
} else {
|
} else {
|
||||||
console.log('Please select valid serial port');
|
console.log('Please select valid serial port');
|
||||||
|
@ -147,7 +147,7 @@ TABS.firmware_flasher.initialize = function (callback) {
|
||||||
STM32DFU.connect(usbDevices.STM32DFU, parsed_hex);
|
STM32DFU.connect(usbDevices.STM32DFU, parsed_hex);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareFlasherFirmwareNotLoaded'));
|
$('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherFirmwareNotLoaded'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,9 +241,20 @@ 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.erase_chip').change(function () {
|
$('input.erase_chip').change(function () {
|
||||||
var status = $(this).is(':checked');
|
chrome.storage.local.set({'erase_chip': $(this).is(':checked')});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
chrome.storage.local.set({'erase_chip': status});
|
chrome.storage.local.get('flash_slowly', function (result) {
|
||||||
|
if (result.flash_slowly) {
|
||||||
|
$('input.flash_slowly').prop('checked', true);
|
||||||
|
} else {
|
||||||
|
$('input.flash_slowly').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// bind UI hook so the status is saved on change
|
||||||
|
$('input.flash_slowly').change(function () {
|
||||||
|
chrome.storage.local.set({'flash_slowly': $(this).is(':checked')});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue