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
c87e44f6
Commit
c87e44f6
authored
Jan 16, 2016
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show ESP8266 Firmware Version in Summary Panel
parent
ecb0c803
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
ESP8266ComponentController.cc
src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
+18
-0
ESP8266ComponentController.h
src/AutoPilotPlugins/Common/ESP8266ComponentController.h
+4
-0
ESP8266ComponentSummary.qml
src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
+4
-8
No files found.
src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
View file @
c87e44f6
...
...
@@ -56,6 +56,8 @@ ESP8266ComponentController::ESP8266ComponentController()
connect
(
paswd
,
&
Fact
::
valueChanged
,
this
,
&
ESP8266ComponentController
::
_passwordChanged
);
Fact
*
baud
=
getParameterFact
(
MAV_COMP_ID_UDP_BRIDGE
,
"UART_BAUDRATE"
);
connect
(
baud
,
&
Fact
::
valueChanged
,
this
,
&
ESP8266ComponentController
::
_baudChanged
);
Fact
*
ver
=
getParameterFact
(
MAV_COMP_ID_UDP_BRIDGE
,
"SW_VER"
);
connect
(
ver
,
&
Fact
::
valueChanged
,
this
,
&
ESP8266ComponentController
::
_versionChanged
);
}
//-----------------------------------------------------------------------------
...
...
@@ -64,6 +66,15 @@ ESP8266ComponentController::~ESP8266ComponentController()
}
//-----------------------------------------------------------------------------
QString
ESP8266ComponentController
::
version
()
{
uint32_t
uv
=
getParameterFact
(
MAV_COMP_ID_UDP_BRIDGE
,
"SW_VER"
)
->
rawValue
().
toUInt
();
QString
versionString
=
QString
(
"%1.%2.%3"
).
arg
(
uv
>>
24
).
arg
((
uv
>>
16
)
&
0xFF
).
arg
(
uv
&
0xFFFF
);
return
versionString
;
}
//-----------------------------------------------------------------------------
QString
ESP8266ComponentController
::
wifiSSID
()
...
...
@@ -316,3 +327,10 @@ ESP8266ComponentController::_baudChanged(QVariant)
{
emit
baudIndexChanged
();
}
//-----------------------------------------------------------------------------
void
ESP8266ComponentController
::
_versionChanged
(
QVariant
)
{
emit
versionChanged
();
}
src/AutoPilotPlugins/Common/ESP8266ComponentController.h
View file @
c87e44f6
...
...
@@ -51,6 +51,7 @@ public:
~
ESP8266ComponentController
();
Q_PROPERTY
(
int
componentID
READ
componentID
CONSTANT
)
Q_PROPERTY
(
QString
version
READ
version
NOTIFY
versionChanged
)
Q_PROPERTY
(
QString
wifiSSID
READ
wifiSSID
WRITE
setWifiSSID
NOTIFY
wifiSSIDChanged
)
Q_PROPERTY
(
QString
wifiPassword
READ
wifiPassword
WRITE
setWifiPassword
NOTIFY
wifiPasswordChanged
)
Q_PROPERTY
(
QStringList
wifiChannels
READ
wifiChannels
CONSTANT
)
...
...
@@ -62,6 +63,7 @@ public:
Q_INVOKABLE
void
reboot
();
int
componentID
()
{
return
MAV_COMP_ID_UDP_BRIDGE
;
}
QString
version
();
QString
wifiSSID
();
QString
wifiPassword
();
QStringList
wifiChannels
()
{
return
_channels
;
}
...
...
@@ -74,6 +76,7 @@ public:
void
setBaudIndex
(
int
idx
);
signals:
void
versionChanged
();
void
wifiSSIDChanged
();
void
wifiPasswordChanged
();
void
baudIndexChanged
();
...
...
@@ -85,6 +88,7 @@ private slots:
void
_ssidChanged
(
QVariant
value
);
void
_passwordChanged
(
QVariant
value
);
void
_baudChanged
(
QVariant
value
);
void
_versionChanged
(
QVariant
value
);
private:
void
_reboot
();
...
...
src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
View file @
c87e44f6
...
...
@@ -28,6 +28,10 @@ FactPanel {
Column
{
anchors.fill
:
parent
anchors.margins
:
8
VehicleSummaryRow
{
labelText
:
"
Firmware Version:
"
valueText
:
esp8266
.
version
}
VehicleSummaryRow
{
labelText
:
"
WiFi Channel:
"
valueText
:
wifiChannel
.
valueString
...
...
@@ -40,14 +44,6 @@ FactPanel {
labelText
:
"
WiFi Password:
"
valueText
:
esp8266
.
wifiPassword
}
VehicleSummaryRow
{
labelText
:
"
QGC UDP Port:
"
valueText
:
wifiHostPort
.
valueString
}
VehicleSummaryRow
{
labelText
:
"
UAV UDP Port:
"
valueText
:
wifiClientPort
.
valueString
}
VehicleSummaryRow
{
labelText
:
"
UART Baud Rate:
"
valueText
:
uartBaud
.
valueString
...
...
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