1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

revamped option part of firmware flasher UI

This commit is contained in:
cTn 2014-10-24 16:55:42 +02:00
parent ed7600facc
commit ad005a3f1c
4 changed files with 59 additions and 42 deletions

View file

@ -649,29 +649,35 @@
"firmwareFlasherLoadFirmwareFile": { "firmwareFlasherLoadFirmwareFile": {
"message": "Please load firmware file" "message": "Please load firmware file"
}, },
"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 />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"
}, },
"firmwareFlasherNoRebootDescription": {
"message": "Check if you are flashing board with bootloader pins shorted"
},
"firmwareFlasherFlashOnConnect": { "firmwareFlasherFlashOnConnect": {
"message": "Flash on connect" "message": "Flash on connect"
}, },
"firmwareFlasherFlashOnConnectDescription": {
"message": "Attempt to flash the board automatically (triggered by newly detected serial port)"
},
"firmwareFlasherFullChipErase": { "firmwareFlasherFullChipErase": {
"message": "Full Chip Erase" "message": "Full Chip Erase"
}, },
"firmwareFlasherFullChipEraseDescription": {
"message": "Wipes all configuration data currently stored on the board"
},
"firmwareFlasherFlashDevelopmentFirmware": { "firmwareFlasherFlashDevelopmentFirmware": {
"message": "Use Development Firmware" "message": "Use Development Firmware"
}, },
"firmwareFlasherFlashDevelopmentFirmwareTitle": { "firmwareFlasherFlashDevelopmentFirmwareDescription": {
"message": "Flash most recent (untested) development firmware" "message": "Flash most recent (untested) development firmware"
}, },
"firmwareFlasherFlashSlowly": { "firmwareFlasherFlashSlowly": {
"message": "Flash slowly" "message": "Flash slowly"
}, },
"firmwareFlasherFlashSlowlyTitle": { "firmwareFlasherFlashSlowlyDescription": {
"message": "Use 115200 baudrate for flashing" "message": "Use 115200 baudrate for flashing (useful for flashing via bluetooth)"
}, },
"firmwareFlasherButtonLoadLocal": { "firmwareFlasherButtonLoadLocal": {
"message": "Load Firmware [Local]" "message": "Load Firmware [Local]"

View file

@ -53,17 +53,13 @@
background-color: #A62E32; background-color: #A62E32;
} }
.tab-firmware_flasher .note { .tab-firmware_flasher .note {
position: relative;
margin-bottom: 10px; margin-bottom: 10px;
padding: 5px; padding: 5px;
border: 1px dotted silver; border: 1px dotted silver;
} }
.tab-firmware_flasher .note p {
margin-bottom: 5px;
}
.tab-firmware_flasher .note label {
float: left;
}
.tab-firmware_flasher .note label input { .tab-firmware_flasher .note label input {
float: left; float: left;
margin-top: 2px; margin-top: 2px;
@ -72,6 +68,13 @@
font-weight: bold; font-weight: bold;
margin-left: 6px; margin-left: 6px;
} }
.tab-firmware_flasher .note .description {
position: absolute;
left: 200px;
font-style: italic;
color: #818181;
}
.tab-firmware_flasher .note .flash_on_connect_wrapper { .tab-firmware_flasher .note .flash_on_connect_wrapper {
display: none; display: none;
} }

View file

@ -4,33 +4,41 @@
<span class="progressLabel" i18n="firmwareFlasherLoadFirmwareFile"></span> <span class="progressLabel" i18n="firmwareFlasherLoadFirmwareFile"></span>
</div> </div>
<div class="note"> <div class="note">
<p i18n="firmwareFlasherNote"> <div class="option">
</p>
<label> <label>
<input class="updating" type="checkbox" /> <input class="updating" type="checkbox" />
<span i18n="firmwareFlasherNoReboot"></span> <span i18n="firmwareFlasherNoReboot"></span>
</label> </label>
<div class="clear-both"></div> <span class="description" i18n="firmwareFlasherNoRebootDescription"></span>
<label class="flash_on_connect_wrapper"> </div>
<div class="option flash_on_connect_wrapper">
<label>
<input class="flash_on_connect" type="checkbox" /> <input class="flash_on_connect" type="checkbox" />
<span i18n="firmwareFlasherFlashOnConnect"></span><br /> <span i18n="firmwareFlasherFlashOnConnect"></span>
</label> </label>
<div class="clear-both"></div> <span class="description" i18n="firmwareFlasherFlashOnConnectDescription"></span>
</div>
<div class="option">
<label> <label>
<input class="erase_chip" type="checkbox" /> <input class="erase_chip" type="checkbox" />
<span i18n="firmwareFlasherFullChipErase"></span> <span i18n="firmwareFlasherFullChipErase"></span>
</label> </label>
<div class="clear-both"></div> <span class="description" i18n="firmwareFlasherFullChipEraseDescription"></span>
<label i18n_title="firmwareFlasherFlashDevelopmentFirmwareTitle"> </div>
<div class="option">
<label>
<input class="flash_development_firmware" type="checkbox" /> <input class="flash_development_firmware" type="checkbox" />
<span i18n="firmwareFlasherFlashDevelopmentFirmware"></span> <span i18n="firmwareFlasherFlashDevelopmentFirmware"></span>
</label> </label>
<div class="clear-both"></div> <span class="description" i18n="firmwareFlasherFlashDevelopmentFirmwareDescription"></span>
<label i18n_title="firmwareFlasherFlashSlowlyTitle"> </div>
<div class="option">
<label>
<input class="flash_slowly" type="checkbox" /> <input class="flash_slowly" type="checkbox" />
<span i18n="firmwareFlasherFlashSlowly"></span> <span i18n="firmwareFlasherFlashSlowly"></span>
</label> </label>
<div class="clear-both"></div> <span class="description" i18n="firmwareFlasherFlashSlowlyDescription"></span>
</div>
</div> </div>
<div class="clear-both"></div> <div class="clear-both"></div>
<div class="git_info"> <div class="git_info">

View file

@ -267,7 +267,7 @@ TABS.firmware_flasher.initialize = function (callback) {
chrome.storage.local.get('no_reboot_sequence', function (result) { chrome.storage.local.get('no_reboot_sequence', function (result) {
if (result.no_reboot_sequence) { if (result.no_reboot_sequence) {
$('input.updating').prop('checked', true); $('input.updating').prop('checked', true);
$('label.flash_on_connect_wrapper').show(); $('.flash_on_connect_wrapper').show();
} else { } else {
$('input.updating').prop('checked', false); $('input.updating').prop('checked', false);
} }
@ -277,10 +277,10 @@ TABS.firmware_flasher.initialize = function (callback) {
var status = $(this).is(':checked'); var status = $(this).is(':checked');
if (status) { if (status) {
$('label.flash_on_connect_wrapper').show(); $('.flash_on_connect_wrapper').show();
} else { } else {
$('input.flash_on_connect').prop('checked', false).change(); $('input.flash_on_connect').prop('checked', false).change();
$('label.flash_on_connect_wrapper').hide(); $('.flash_on_connect_wrapper').hide();
} }
chrome.storage.local.set({'no_reboot_sequence': status}); chrome.storage.local.set({'no_reboot_sequence': status});