Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
eec1bede
Unverified
Commit
eec1bede
authored
Aug 23, 2019
by
Gus Grubba
Committed by
GitHub
Aug 23, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7606 from olliw42/pr-storagefreesize
CameraManager, improve displayed available memory
parents
242d6519
7603d6d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
QGCCameraControl.cc
src/Camera/QGCCameraControl.cc
+1
-1
QGCMapEngine.cpp
src/QtLocationPlugin/QGCMapEngine.cpp
+12
-0
QGCMapEngine.h
src/QtLocationPlugin/QGCMapEngine.h
+1
-0
No files found.
src/Camera/QGCCameraControl.cc
View file @
eec1bede
...
...
@@ -260,7 +260,7 @@ QGCCameraControl::photoStatus()
QString
QGCCameraControl
::
storageFreeStr
()
{
return
QGCMapEngine
::
bigSizeToString
(
static_cast
<
quint64
>
(
_storageFree
)
*
1024
*
1024
);
return
QGCMapEngine
::
storageFreeSizeToString
(
static_cast
<
quint64
>
(
_storageFree
)
);
}
//-----------------------------------------------------------------------------
...
...
src/QtLocationPlugin/QGCMapEngine.cpp
View file @
eec1bede
...
...
@@ -471,6 +471,18 @@ QGCMapEngine::bigSizeToString(quint64 size)
return
kLocale
.
toString
(
static_cast
<
double
>
(
size
)
/
(
1024.0
*
1024.0
*
1024.0
*
1024
),
'f'
,
1
)
+
"TB"
;
}
//-----------------------------------------------------------------------------
QString
QGCMapEngine
::
storageFreeSizeToString
(
quint64
size_MB
)
{
if
(
size_MB
<
1024
)
return
kLocale
.
toString
(
static_cast
<
double
>
(
size_MB
)
,
'f'
,
0
)
+
" MB"
;
else
if
(
size_MB
<
1024.0
*
1024.0
)
return
kLocale
.
toString
(
static_cast
<
double
>
(
size_MB
)
/
(
1024.0
),
'f'
,
2
)
+
" GB"
;
else
return
kLocale
.
toString
(
static_cast
<
double
>
(
size_MB
)
/
(
1024.0
*
1024
),
'f'
,
2
)
+
" TB"
;
}
//-----------------------------------------------------------------------------
QString
QGCMapEngine
::
numberToString
(
quint64
number
)
...
...
src/QtLocationPlugin/QGCMapEngine.h
View file @
eec1bede
...
...
@@ -99,6 +99,7 @@ public:
static
QString
getTileHash
(
UrlFactory
::
MapType
type
,
int
x
,
int
y
,
int
z
);
static
UrlFactory
::
MapType
getTypeFromName
(
const
QString
&
name
);
static
QString
bigSizeToString
(
quint64
size
);
static
QString
storageFreeSizeToString
(
quint64
size_MB
);
static
QString
numberToString
(
quint64
number
);
static
int
concurrentDownloads
(
UrlFactory
::
MapType
type
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment