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
09cc683c
Commit
09cc683c
authored
Jul 29, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes for a better looking and functioning ApmFirmwareConfig screen
parent
56efe884
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
342 additions
and
347 deletions
+342
-347
qgroundcontrol.pro
qgroundcontrol.pro
+3
-6
ApmFirmwareConfig.cc
src/ui/configuration/ApmFirmwareConfig.cc
+269
-211
ApmFirmwareConfig.h
src/ui/configuration/ApmFirmwareConfig.h
+9
-3
ApmFirmwareConfig.ui
src/ui/configuration/ApmFirmwareConfig.ui
+61
-6
ApmFirmwareStatus.cc
src/ui/configuration/ApmFirmwareStatus.cc
+0
-30
ApmFirmwareStatus.h
src/ui/configuration/ApmFirmwareStatus.h
+0
-23
ApmFirmwareStatus.ui
src/ui/configuration/ApmFirmwareStatus.ui
+0
-68
No files found.
qgroundcontrol.pro
View file @
09cc683c
...
...
@@ -263,8 +263,7 @@ FORMS += src/ui/MainWindow.ui \
src
/
ui
/
configuration
/
ArduRoverPidConfig
.
ui
\
src
/
ui
/
configuration
/
terminalconsole
.
ui
\
src
/
ui
/
configuration
/
SerialSettingsDialog
.
ui
\
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
ui
\
src
/
ui
/
configuration
/
ApmFirmwareStatus
.
ui
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
ui
INCLUDEPATH
+=
src
\
src
/
ui
\
src
/
ui
/
linechart
\
...
...
@@ -455,8 +454,7 @@ HEADERS += src/MG.h \
src
/
ui
/
configuration
/
SerialSettingsDialog
.
h
\
src
/
ui
/
configuration
/
terminalconsole
.
h
\
src
/
ui
/
configuration
/
ApmHighlighter
.
h
\
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
h
\
src
/
ui
/
configuration
/
ApmFirmwareStatus
.
h
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
h
#
Google
Earth
is
only
supported
on
Mac
OS
and
Windows
with
Visual
Studio
Compiler
macx
|
macx
-
g
++
|
macx
-
g
++
42
|
win32
-
msvc2008
|
win32
-
msvc2010
|
win32
-
msvc2012
::
HEADERS
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
h
...
...
@@ -666,8 +664,7 @@ SOURCES += src/main.cc \
src
/
ui
/
configuration
/
console
.
cpp
\
src
/
ui
/
configuration
/
SerialSettingsDialog
.
cc
\
src
/
ui
/
configuration
/
ApmHighlighter
.
cc
\
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
cc
\
src
/
ui
/
configuration
/
ApmFirmwareStatus
.
cc
src
/
ui
/
configuration
/
ApmFirmwareConfig
.
cc
#
Enable
Google
Earth
only
on
Mac
OS
and
Windows
with
Visual
Studio
compiler
macx
|
macx
-
g
++
|
macx
-
g
++
42
|
win32
-
msvc2008
|
win32
-
msvc2010
|
win32
-
msvc2012
::
SOURCES
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
cc
...
...
src/ui/configuration/ApmFirmwareConfig.cc
View file @
09cc683c
This diff is collapsed.
Click to expand it.
src/ui/configuration/ApmFirmwareConfig.h
View file @
09cc683c
...
...
@@ -8,6 +8,9 @@
#include <QDebug>
#include <QTemporaryFile>
#include <QProcess>
#include <QXmlStreamReader>
#include <QMessageBox>
#include <QProcess>
#include "qserialport.h"
#include "ui_ApmFirmwareConfig.h"
#include "ApmFirmwareStatus.h"
...
...
@@ -23,16 +26,19 @@ private slots:
void
firmwareListFinished
();
void
firmwareListError
(
QNetworkReply
::
NetworkError
error
);
void
burnButtonClicked
();
void
betaFirmwareButtonClicked
();
void
betaFirmwareButtonClicked
(
bool
betafirmwareenabled
);
void
downloadFinished
();
void
firmwareProcessFinished
(
int
status
);
void
firmwareProcessReadyRead
();
void
firmwareProcessError
(
QProcess
::
ProcessError
error
);
void
firmwareDownloadProgress
(
qint64
received
,
qint64
total
);
private:
ApmFirmwareStatus
*
firmwareStatus
;
//ApmFirmwareStatus *firmwareStatus;
QString
m_detectedComPort
;
QTemporaryFile
*
m_tempFirmwareFile
;
QNetworkAccessManager
*
m_networkManager
;
void
requestFirmwares
(
bool
beta
);
void
requestFirmwares
();
void
requestBetaFirmwares
();
bool
stripVersionFromGitReply
(
QString
url
,
QString
reply
,
QString
type
,
QString
stable
,
QString
*
out
);
bool
m_betaFirmwareChecked
;
QMap
<
QPushButton
*
,
QString
>
m_buttonToUrlMap
;
...
...
src/ui/configuration/ApmFirmwareConfig.ui
View file @
09cc683c
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
95
8
</width>
<height>
497
</height>
<width>
86
8
</width>
<height>
661
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -18,7 +18,7 @@
<rect>
<x>
10
</x>
<y>
20
</y>
<width>
9
1
</width>
<width>
21
1
</width>
<height>
31
</height>
</rect>
</property>
...
...
@@ -428,14 +428,69 @@
<widget
class=
"QPushButton"
name=
"betaFirmwareButton"
>
<property
name=
"geometry"
>
<rect>
<x>
7
6
0
</x>
<x>
7
0
0
</x>
<y>
440
</y>
<width>
9
1
</width>
<width>
13
1
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Beta firmwares
</string>
<string>
Beta firmware
</string>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
</widget>
<widget
class=
"QProgressBar"
name=
"progressBar"
>
<property
name=
"geometry"
>
<rect>
<x>
50
</x>
<y>
470
</y>
<width>
791
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"value"
>
<number>
24
</number>
</property>
</widget>
<widget
class=
"QTextBrowser"
name=
"textBrowser"
>
<property
name=
"geometry"
>
<rect>
<x>
60
</x>
<y>
500
</y>
<width>
741
</width>
<height>
151
</height>
</rect>
</property>
</widget>
<widget
class=
"QCheckBox"
name=
"showOutputCheckBox"
>
<property
name=
"geometry"
>
<rect>
<x>
600
</x>
<y>
440
</y>
<width>
101
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Show Output
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"statusLabel"
>
<property
name=
"geometry"
>
<rect>
<x>
60
</x>
<y>
440
</y>
<width>
141
</width>
<height>
21
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Status
</string>
</property>
</widget>
</widget>
...
...
src/ui/configuration/ApmFirmwareStatus.cc
deleted
100644 → 0
View file @
56efe884
#include "ApmFirmwareStatus.h"
ApmFirmwareStatus
::
ApmFirmwareStatus
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
ui
.
progressBar
->
setMaximum
(
50
);
}
ApmFirmwareStatus
::~
ApmFirmwareStatus
()
{
}
void
ApmFirmwareStatus
::
passMessage
(
QString
msg
)
{
ui
.
textBrowser
->
append
(
msg
);
}
void
ApmFirmwareStatus
::
setStatus
(
QString
message
)
{
ui
.
label
->
setText
(
"<h2>"
+
message
+
"</h2>"
);
}
void
ApmFirmwareStatus
::
resetProgress
()
{
ui
.
progressBar
->
setValue
(
0
);
}
void
ApmFirmwareStatus
::
progressTick
()
{
ui
.
progressBar
->
setValue
(
ui
.
progressBar
->
value
()
+
1
);
}
src/ui/configuration/ApmFirmwareStatus.h
deleted
100644 → 0
View file @
56efe884
#ifndef APMFIRMWARESTATUS_H
#define APMFIRMWARESTATUS_H
#include <QWidget>
#include "ui_ApmFirmwareStatus.h"
class
ApmFirmwareStatus
:
public
QWidget
{
Q_OBJECT
public:
explicit
ApmFirmwareStatus
(
QWidget
*
parent
=
0
);
~
ApmFirmwareStatus
();
void
passMessage
(
QString
msg
);
void
setStatus
(
QString
message
);
void
resetProgress
();
void
progressTick
();
private:
Ui
::
ApmFirmwareStatus
ui
;
};
#endif // APMFIRMWARESTATUS_H
src/ui/configuration/ApmFirmwareStatus.ui
deleted
100644 → 0
View file @
56efe884
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
ApmFirmwareStatus
</class>
<widget
class=
"QWidget"
name=
"ApmFirmwareStatus"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
889
</width>
<height>
313
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<widget
class=
"QPushButton"
name=
"closePushButton"
>
<property
name=
"geometry"
>
<rect>
<x>
390
</x>
<y>
110
</y>
<width>
75
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Close
</string>
</property>
</widget>
<widget
class=
"QTextBrowser"
name=
"textBrowser"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
150
</y>
<width>
871
</width>
<height>
141
</height>
</rect>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
20
</x>
<y>
20
</y>
<width>
291
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
<
h2
>
Status
<
/h2
>
</string>
</property>
</widget>
<widget
class=
"QProgressBar"
name=
"progressBar"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
70
</y>
<width>
851
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"value"
>
<number>
0
</number>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
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