diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 4bfdcf5b..6f4ea72b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -136,7 +136,7 @@ "message": "Request Optional Permissions" }, "defaultWelcomeText": { - "message": "This application is a configuration utility for cleanflight, a 32 bit fork of the popular open source RC flight control firmware project MultiWii.

Application supports hardware that run cleanflight (acro naze, naze, afromini, flip32, flip32+, chebuzz f3, stm32f3discovery, naze32pro, etc)

The firmware source code can be downloaded from here
The newest binary firmware image is available here

Latest CP210x Drivers can be downloaded from here
" + "message": "Welcome to Cleanflight - Configurator, utility designed to simplify updating, configuring and tuning of your flight controller.

Application supports hardware that run cleanflight (acro naze, naze, afromini, flip32, flip32+, chebuzz f3, stm32f3discovery, naze32pro, etc)

The firmware source code can be downloaded from here
The newest binary firmware image is available here

Latest CP210x Drivers can be downloaded from here
" }, "defaultChangelogHead": { "message": "Configurator - Changelog" @@ -524,7 +524,7 @@ "message": "Progress:" }, "firmwareFlasherNote": { - "message": "If you are flashing board with bootloader pins shorted/connected, check No reboot sequence.
If you want configuration data to be wiped, check Full Chip Erase
" + "message": "If you are flashing board with bootloader pins shorted/connected, check No reboot sequence.
If you want configuration data to be wiped, check Full Chip Erase
If you are flashing via bluetooth adapter or using external usb to serial adapter, check Flash slowly
" }, "firmwareFlasherNoReboot": { "message": "No reboot sequence" @@ -535,6 +535,12 @@ "firmwareFlasherFullChipErase": { "message": "Full Chip Erase" }, + "firmwareFlasherFlashSlowly": { + "message": "Flash slowly" + }, + "firmwareFlasherFlashSlowlyTitle": { + "message": "Use 115200 baudrate for flashing" + }, "firmwareFlasherButtonLoadLocal": { "message": "Load Firmware [Local]" }, @@ -566,19 +572,16 @@ "message": "Leave Firmware Flasher" }, "firmwareFlasherFirmwareNotLoaded": { - "message": "Firmware not loaded" - }, - "firmwareFlasherLocalFirmwareLoaded": { - "message": "Local Firmware loaded, ready for flashing" + "message": "Firmware not loaded" }, "firmwareFlasherHexCorrupted": { - "message": "HEX file appears to be corrupted" + "message": "HEX file appears to be corrupted" }, "firmwareFlasherRemoteFirmwareLoaded": { "message": "Remote Firmware loaded, ready for flashing" }, "firmwareFlasherFailedToLoadOnlineFirmware": { - "message": "Failed to load remote firmware" + "message": "Failed to load remote firmware" }, "firmwareFlasherWaitForFinish": { "message": "You can't do this right now, please wait for current operation to finish ..." diff --git a/changelog.html b/changelog.html index 749e7a6e..7c49f493 100644 --- a/changelog.html +++ b/changelog.html @@ -1,6 +1,8 @@ -08.25.2014 - 0.49.2 cleanflight +08.31.2014 - 0.50

- - Disable sponsors panel. + - Small UI revamp for Firmware Flasher
+ - Added "Flash slowly" mode (bluetooth friendly)
+ - Bugfixes

08.25.2014 - 0.49.1 cleanflight

diff --git a/js/data_storage.js b/js/data_storage.js index 36151a7c..ef80cc99 100644 --- a/js/data_storage.js +++ b/js/data_storage.js @@ -1,7 +1,7 @@ 'use strict'; var CONFIGURATOR = { - 'releaseDate': 1408379746980, // 08.18.2014 - new Date().getTime() + 'releaseDate': 1409496670288, // 08.31.2014 - new Date().getTime() 'firmwareVersionAccepted': 2.3, 'connectionValid': false, 'mspPassThrough': false, diff --git a/js/protocols/stm32usbdfu.js b/js/protocols/stm32usbdfu.js index 50da3e9d..e145f977 100644 --- a/js/protocols/stm32usbdfu.js +++ b/js/protocols/stm32usbdfu.js @@ -256,7 +256,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) { case 2: // full 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('in', self.request.GETSTATUS, 0, 0, 6, 0, function (data) { @@ -284,7 +284,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) { // upload // we dont need to clear the state as we are already using DFU_DNLOAD console.log('Writing data ...'); - GUI.log('Flashing ...'); + $('span.progressLabel').text('Flashing ...'); var blocks = self.hex.data.length - 1; var flashing_block = 0; @@ -355,7 +355,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) { case 5: // verify console.log('Verifying data ...'); - GUI.log('Verifying ...'); + $('span.progressLabel').text('Verifying ...'); var blocks = self.hex.data.length - 1; var reading_block = 0; @@ -422,7 +422,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) { if (verify) { console.log('Programming: SUCCESSFUL'); - GUI.log('Programming: SUCCESSFUL'); + $('span.progressLabel').text('Programming: SUCCESSFUL'); googleAnalytics.sendEvent('Flashing', 'Programming', 'success'); // update progress bar @@ -432,7 +432,7 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) { self.upload_procedure(6); } else { console.log('Programming: FAILED'); - GUI.log('Programming: FAILED'); + $('span.progressLabel').text('Programming: FAILED'); googleAnalytics.sendEvent('Flashing', 'Programming', 'fail'); // update progress bar diff --git a/manifest.json b/manifest.json index b2b140e4..f2447aca 100644 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,7 @@ { "manifest_version": 2, "minimum_chrome_version": "36", - "version": "0.49.2", - + "version": "0.50", "author": "Hydra", "name": "Cleanflight - Configurator", "short_name": "cleanflight", diff --git a/tabs/auxiliary_configuration.js b/tabs/auxiliary_configuration.js index df54efe0..0287ccf3 100644 --- a/tabs/auxiliary_configuration.js +++ b/tabs/auxiliary_configuration.js @@ -125,7 +125,7 @@ TABS.auxiliary_configuration.initialize = function (callback) { 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); function save_to_eeprom() { diff --git a/tabs/default.css b/tabs/default.css index edd13cc1..e44771d6 100644 --- a/tabs/default.css +++ b/tabs/default.css @@ -146,9 +146,6 @@ .firmware_flasher:hover { background-color: #dedcdc; } - .tab-default .sponsors { - display: none; - } .tab-default .sponsors { margin-top: 10px; border: 1px solid silver; diff --git a/tabs/default.html b/tabs/default.html index 85c8f182..3b0970d7 100644 --- a/tabs/default.html +++ b/tabs/default.html @@ -11,7 +11,7 @@

-
+
diff --git a/tabs/firmware_flasher.css b/tabs/firmware_flasher.css index 1b79862d..be3f0df8 100644 --- a/tabs/firmware_flasher.css +++ b/tabs/firmware_flasher.css @@ -1,22 +1,50 @@ .tab-firmware_flasher .info { margin: 0 0 10px 0; + position: relative; } - .tab-firmware_flasher .info strong { - margin-right: 5px; + .tab-firmware_flasher .info .progressLabel { + 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 { - width: 25%; + width: 100%; + height: 26px; border: 1px solid silver; } - .tab-firmware_flasher .info .progress::-webkit-progress-value { - background-color: #f4af4d; + .tab-firmware_flasher .info .progress { + -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 { - 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 { - background-color: #cf2222; + background-color: #A62E32; } .tab-firmware_flasher .note { margin-bottom: 10px; diff --git a/tabs/firmware_flasher.html b/tabs/firmware_flasher.html index 4f94451f..32b1bcb5 100644 --- a/tabs/firmware_flasher.html +++ b/tabs/firmware_flasher.html @@ -1,8 +1,7 @@
- empty
- 0 bytes
- + + Please load firmware file

@@ -22,6 +21,11 @@

+ +
diff --git a/tabs/firmware_flasher.js b/tabs/firmware_flasher.js index 2f49f738..c38eed33 100644 --- a/tabs/firmware_flasher.js +++ b/tabs/firmware_flasher.js @@ -6,8 +6,8 @@ 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 - var parsed_hex = false; // parsed raw hex in array format + 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 @@ -27,7 +27,6 @@ TABS.firmware_flasher.initialize = function (callback) { chrome.fileSystem.getDisplayPath(fileEntry, function (path) { console.log('Loading file from: ' + path); - $('span.path').html(path); fileEntry.file(function (file) { var reader = new FileReader(); @@ -50,13 +49,12 @@ TABS.firmware_flasher.initialize = function (callback) { parsed_hex = data; if (parsed_hex) { - GUI.log(chrome.i18n.getMessage('firmwareFlasherLocalFirmwareLoaded')); googleAnalytics.sendEvent('Flashing', 'Firmware', 'local'); $('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 { - 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() { - $.get('https://raw.githubusercontent.com/hydra/cleanflight/master/obj/cleanflight_NAZE.hex', function (data) { + $('a.load_remote_file').click(function () { + $.get('https://raw.githubusercontent.com/multiwii/baseflight/master/obj/baseflight.hex', function (data) { intel_hex = data; parse_hex(intel_hex, function (data) { parsed_hex = data; if (parsed_hex) { - GUI.log(chrome.i18n.getMessage('firmwareFlasherRemoteFirmwareLoaded')); googleAnalytics.sendEvent('Flashing', 'Firmware', 'online'); + $('span.progressLabel').text('Loaded Online Firmware: (' + parsed_hex.bytes_total + ' bytes)'); $('a.flash_firmware').removeClass('locked'); - $('span.path').text('Using remote Firmware'); - $('span.size').text(parsed_hex.bytes_total + ' bytes'); + $.get('https://api.github.com/repos/multiwii/baseflight/commits?page=1&per_page=1&path=obj/baseflight.hex', function (data) { + 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 { - GUI.log(chrome.i18n.getMessage('firmwareFlasherHexCorrupted')); + $('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherHexCorrupted')); } }); }).fail(function () { - GUI.log(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware')); + $('span.progressLabel').text(chrome.i18n.getMessage('firmwareFlasherFailedToLoadOnlineFirmware')); $('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 () { @@ -111,9 +107,9 @@ TABS.firmware_flasher.initialize = function (callback) { if (parsed_hex != false) { if (String($('div#port-picker #port').val()) != 'DFU') { if (String($('div#port-picker #port').val()) != '0') { - var options = {}; - var port = String($('div#port-picker #port').val()); - var baud; + var options = {}, + port = String($('div#port-picker #port').val()), + baud; switch (GUI.operating_system) { case 'Windows': @@ -138,6 +134,10 @@ TABS.firmware_flasher.initialize = function (callback) { options.erase_chip = true; } + if ($('input.flash_slowly').is(':checked')) { + options.flash_slowly = true; + } + STM32.connect(port, baud, parsed_hex, options); } else { console.log('Please select valid serial port'); @@ -147,7 +147,7 @@ TABS.firmware_flasher.initialize = function (callback) { STM32DFU.connect(usbDevices.STM32DFU, parsed_hex); } } 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 $('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')}); }); });