Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1 class="modal__title modal__title" data-i18n="appUpdateNotificationHeader"></
<div class="dropdown dropdown-dark">
<form name="profile-change" id="profile-change">
<!--suppress HtmlFormInputWithoutLabel -->
<select class="dropdown-select" id="profilechange">
<select class="dropdown-select" id="profilechange" data-i18n_title="sensorProfileTitle">
<option value="0" i18n="sensorProfile1"></option>
<option value="1" i18n="sensorProfile2"></option>
<option value="2" i18n="sensorProfile3"></option>
Expand All @@ -98,7 +98,7 @@ <h1 class="modal__title modal__title" data-i18n="appUpdateNotificationHeader"></
<div id="mixer_profile_change">
<div class="dropdown dropdown-dark">
<form name="mixer-profile-change" id="mixer-profile-change">
<select class="dropdown-select" id="mixerprofilechange">
<select class="dropdown-select" id="mixerprofilechange" data-i18n_title="mixerProfileTitle">
<option value="0" i18n="mixerProfile1"></option>
<option value="1" i18n="mixerProfile2"></option>
</select>
Expand All @@ -109,7 +109,7 @@ <h1 class="modal__title modal__title" data-i18n="appUpdateNotificationHeader"></
<div class="dropdown dropdown-dark">
<form name="battery-profile-change" id="battery-profile-change">
<!--suppress HtmlFormInputWithoutLabel -->
<select class="dropdown-select" id="batteryprofilechange">
<select class="dropdown-select" id="batteryprofilechange" data-i18n_title="sensorBatteryProfileTitle">
<option value="0" i18n="sensorBatteryProfile1"></option>
<option value="1" i18n="sensorBatteryProfile2"></option>
<option value="2" i18n="sensorBatteryProfile3"></option>
Expand All @@ -120,10 +120,9 @@ <h1 class="modal__title modal__title" data-i18n="appUpdateNotificationHeader"></
</div>
<div id="dataflash_wrapper_global">
<div class="noflash_global" align="center" i18n="sensorDataFlashNotFound"></div>
<div class="dataflash-free_global_label" i18n="sensorDataFlashFreeSpace"></div>
<ul class="dataflash-contents_global">
<li class="dataflash-free_global">
<div class="legend" i18n="sensorDataFlashFreeSpace"></div>
</li>
<li class="dataflash-free_global"></li>
</ul>
</div>
<div id="sensor-status" class="sensor_state mode-connected">
Expand Down Expand Up @@ -161,6 +160,7 @@ <h1 class="modal__title modal__title" data-i18n="appUpdateNotificationHeader"></
<div class="battery-status"></div>
</div>
</div>
<div class="battery-label">Batt</div>
<div class="battery-legend" i18n="sensorBatteryVoltage"></div>
<div class="bottomStatusIcons">
<div id="armedIcon" class="statusicon armed cf_tip" data-i18n_title="mainHelpArmed"></div>
Expand Down
8 changes: 4 additions & 4 deletions js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,17 +452,17 @@ GUI_control.prototype.sliderize = function ($input, value, min, max) {
GUI_control.prototype.update_dataflash_global = function () {
function formatFilesize(bytes) {
if (bytes < 1024) {
return bytes + "B";
return Math.round(bytes / 1024) + " KB";
}
var kilobytes = bytes / 1024;

if (kilobytes < 1024) {
return Math.round(kilobytes) + "kB";
return Math.round(kilobytes) + " KB";
}

var megabytes = kilobytes / 1024;

return megabytes.toFixed(1) + "MB";
return megabytes.toFixed(1) + " MB";
}

var supportsDataflash = FC.DATAFLASH.totalSize > 0;
Expand All @@ -480,7 +480,7 @@ GUI_control.prototype.update_dataflash_global = function () {
width: (100-(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) / FC.DATAFLASH.totalSize * 100) + "%",
display: 'block'
});
$(".dataflash-free_global div").html(i18n.getMessage('sensorDataFlashFreeSpace') + formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize));
$(".dataflash-free_global_label").html(i18n.getMessage('sensorDataFlashFreeSpace') + formatFilesize(FC.DATAFLASH.totalSize - FC.DATAFLASH.usedSize) + " free");
} else {
$(".noflash_global").css({
display: 'block'
Expand Down
Loading