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
dffc01d6
Commit
dffc01d6
authored
Feb 10, 2011
by
Alejandro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working in SLUGS widgets for debug
parent
3b928588
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
6369 additions
and
7636 deletions
+6369
-7636
qgroundcontrol.pro
qgroundcontrol.pro
+457
-454
SlugsMAV.cc
src/uas/SlugsMAV.cc
+267
-265
SlugsMAV.h
src/uas/SlugsMAV.h
+133
-133
UAS.cc
src/uas/UAS.cc
+15
-4
MainWindow.cc
src/ui/MainWindow.cc
+35
-23
QGCRemoteControlView.cc
src/ui/QGCRemoteControlView.cc
+213
-225
QGCRemoteControlView.h
src/ui/QGCRemoteControlView.h
+82
-82
QGCRemoteControlView.ui
src/ui/QGCRemoteControlView.ui
+19
-333
SlugsDataSensorView.cc
src/ui/SlugsDataSensorView.cc
+326
-328
SlugsDataSensorView.ui
src/ui/SlugsDataSensorView.ui
+3508
-4480
SlugsHilSim.cc
src/ui/SlugsHilSim.cc
+358
-356
SlugsPIDControl.cpp
src/ui/SlugsPIDControl.cpp
+735
-735
UASInfoWidget.cc
src/ui/uas/UASInfoWidget.cc
+220
-217
UASView.cc
src/ui/uas/UASView.cc
+1
-1
No files found.
qgroundcontrol.pro
View file @
dffc01d6
This diff is collapsed.
Click to expand it.
src/uas/SlugsMAV.cc
View file @
dffc01d6
This diff is collapsed.
Click to expand it.
src/uas/SlugsMAV.h
View file @
dffc01d6
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef SLUGSMAV_H
#define SLUGSMAV_H
#include "UAS.h"
#include "mavlink.h"
#include <QTimer>
#define SLUGS_UPDATE_RATE 100 // in ms
class
SlugsMAV
:
public
UAS
{
Q_OBJECT
Q_INTERFACES
(
UASInterface
)
public:
SlugsMAV
(
MAVLinkProtocol
*
mavlink
,
int
id
=
0
);
public
slots
:
/** @brief Receive a MAVLink message from this MAV */
void
receiveMessage
(
LinkInterface
*
link
,
mavlink_message_t
message
);
void
emitSignals
(
void
);
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_pwm_commands_t
*
getPwmCommands
();
#endif
signals:
void
slugsRawImu
(
int
uasId
,
const
mavlink_raw_imu_t
&
rawData
);
void
slugsGPSCogSog
(
int
uasId
,
double
cog
,
double
sog
);
#ifdef MAVLINK_ENABLED_SLUGS
void
slugsCPULoad
(
int
systemId
,
const
mavlink_cpu_load_t
&
cpuLoad
);
void
slugsAirData
(
int
systemId
,
const
mavlink_air_data_t
&
airData
);
void
slugsSensorBias
(
int
systemId
,
const
mavlink_sensor_bias_t
&
sensorBias
);
void
slugsDiagnostic
(
int
systemId
,
const
mavlink_diagnostic_t
&
diagnostic
);
void
slugsPilotConsolePWM
(
int
systemId
,
const
mavlink_pilot_console_t
&
pilotConsole
);
void
slugsPWM
(
int
systemId
,
const
mavlink_pwm_commands_t
&
pwmCommands
);
void
slugsNavegation
(
int
systemId
,
const
mavlink_slugs_navigation_t
&
slugsNavigation
);
void
slugsDataLog
(
int
systemId
,
const
mavlink_data_log_t
&
dataLog
);
void
slugsFilteredData
(
int
systemId
,
const
mavlink_filtered_data_t
&
filteredData
);
void
slugsGPSDateTime
(
int
systemId
,
const
mavlink_gps_date_time_t
&
gpsDateTime
);
void
slugsActionAck
(
int
systemId
,
const
mavlink_action_ack_t
&
actionAck
);
void
slugsPidValues
(
int
systemId
,
const
mavlink_pid_t
&
pidValues
);
void
slugsBootMsg
(
int
uasId
,
mavlink_boot_t
&
boot
);
void
slugsAttitude
(
int
uasId
,
mavlink_attitude_t
&
attitude
);
#endif
protected:
typedef
struct
_mavlink_pid_values_t
{
float
P
[
11
];
float
I
[
11
];
float
D
[
11
];
}
mavlink_pid_values_t
;
unsigned
char
updateRoundRobin
;
QTimer
*
widgetTimer
;
mavlink_raw_imu_t
mlRawImuData
;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_gps_raw_t
mlGpsData
;
mavlink_attitude_t
mlAttitude
;
mavlink_cpu_load_t
mlCpuLoadData
;
mavlink_air_data_t
mlAirData
;
mavlink_sensor_bias_t
mlSensorBiasData
;
mavlink_diagnostic_t
mlDiagnosticData
;
mavlink_pilot_console_t
mlPilotConsoleData
;
mavlink_filtered_data_t
mlFilteredData
;
mavlink_boot_t
mlBoot
;
mavlink_gps_date_time_t
mlGpsDateTime
;
mavlink_mid_lvl_cmds_t
mlMidLevelCommands
;
mavlink_set_mode_t
mlApMode
;
mavlink_pwm_commands_t
mlPwmCommands
;
mavlink_pid_values_t
mlPidValues
;
mavlink_pid_t
mlSinglePid
;
mavlink_slugs_navigation_t
mlNavigation
;
mavlink_data_log_t
mlDataLog
;
mavlink_ctrl_srfc_pt_t
mlPassthrough
;
mavlink_action_ack_t
mlActionAck
;
mavlink_slugs_action_t
mlAction
;
// Standart messages MAVLINK used by SLUGS
private:
void
emitGpsSignals
(
void
);
void
emitPidSignal
(
void
);
int
uasId
;
#endif // if SLUGS
};
#endif // SLUGSMAV_H
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef SLUGSMAV_H
#define SLUGSMAV_H
#include "UAS.h"
#include "mavlink.h"
#include <QTimer>
#define SLUGS_UPDATE_RATE 100 // in ms
class
SlugsMAV
:
public
UAS
{
Q_OBJECT
Q_INTERFACES
(
UASInterface
)
public:
SlugsMAV
(
MAVLinkProtocol
*
mavlink
,
int
id
=
0
);
public
slots
:
/** @brief Receive a MAVLink message from this MAV */
void
receiveMessage
(
LinkInterface
*
link
,
mavlink_message_t
message
);
void
emitSignals
(
void
);
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_pwm_commands_t
*
getPwmCommands
();
#endif
signals:
void
slugsRawImu
(
int
uasId
,
const
mavlink_raw_imu_t
&
rawData
);
void
slugsGPSCogSog
(
int
uasId
,
double
cog
,
double
sog
);
#ifdef MAVLINK_ENABLED_SLUGS
void
slugsCPULoad
(
int
systemId
,
const
mavlink_cpu_load_t
&
cpuLoad
);
void
slugsAirData
(
int
systemId
,
const
mavlink_air_data_t
&
airData
);
void
slugsSensorBias
(
int
systemId
,
const
mavlink_sensor_bias_t
&
sensorBias
);
void
slugsDiagnostic
(
int
systemId
,
const
mavlink_diagnostic_t
&
diagnostic
);
void
slugsPilotConsolePWM
(
int
systemId
,
const
mavlink_pilot_console_t
&
pilotConsole
);
void
slugsPWM
(
int
systemId
,
const
mavlink_pwm_commands_t
&
pwmCommands
);
void
slugsNavegation
(
int
systemId
,
const
mavlink_slugs_navigation_t
&
slugsNavigation
);
void
slugsDataLog
(
int
systemId
,
const
mavlink_data_log_t
&
dataLog
);
void
slugsFilteredData
(
int
systemId
,
const
mavlink_filtered_data_t
&
filteredData
);
void
slugsGPSDateTime
(
int
systemId
,
const
mavlink_gps_date_time_t
&
gpsDateTime
);
void
slugsActionAck
(
int
systemId
,
const
mavlink_action_ack_t
&
actionAck
);
void
slugsPidValues
(
int
systemId
,
const
mavlink_pid_t
&
pidValues
);
void
slugsBootMsg
(
int
uasId
,
mavlink_boot_t
&
boot
);
void
slugsAttitude
(
int
uasId
,
mavlink_attitude_t
&
attitude
);
#endif
protected:
typedef
struct
_mavlink_pid_values_t
{
float
P
[
11
];
float
I
[
11
];
float
D
[
11
];
}
mavlink_pid_values_t
;
unsigned
char
updateRoundRobin
;
QTimer
*
widgetTimer
;
mavlink_raw_imu_t
mlRawImuData
;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_gps_raw_t
mlGpsData
;
mavlink_attitude_t
mlAttitude
;
mavlink_cpu_load_t
mlCpuLoadData
;
mavlink_air_data_t
mlAirData
;
mavlink_sensor_bias_t
mlSensorBiasData
;
mavlink_diagnostic_t
mlDiagnosticData
;
mavlink_pilot_console_t
mlPilotConsoleData
;
mavlink_filtered_data_t
mlFilteredData
;
mavlink_boot_t
mlBoot
;
mavlink_gps_date_time_t
mlGpsDateTime
;
mavlink_mid_lvl_cmds_t
mlMidLevelCommands
;
mavlink_set_mode_t
mlApMode
;
mavlink_pwm_commands_t
mlPwmCommands
;
mavlink_pid_values_t
mlPidValues
;
mavlink_pid_t
mlSinglePid
;
mavlink_slugs_navigation_t
mlNavigation
;
mavlink_data_log_t
mlDataLog
;
mavlink_ctrl_srfc_pt_t
mlPassthrough
;
mavlink_action_ack_t
mlActionAck
;
mavlink_slugs_action_t
mlAction
;
// Standart messages MAVLINK used by SLUGS
private:
void
emitGpsSignals
(
void
);
void
emitPidSignal
(
void
);
int
uasId
;
#endif // if SLUGS
};
#endif // SLUGSMAV_H
src/uas/UAS.cc
View file @
dffc01d6
...
...
@@ -244,7 +244,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_msg_sys_status_decode
(
&
message
,
&
state
);
// FIXME
qDebug
()
<<
"1 SYSTEM STATUS:"
<<
state
.
status
;
//
qDebug() << "1 SYSTEM STATUS:" << state.status;
QString
audiostring
=
"System "
+
QString
::
number
(
this
->
getUASID
());
QString
stateAudio
=
""
;
...
...
@@ -260,12 +260,13 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
statusChanged
(
this
,
uasState
,
stateDescription
);
emit
statusChanged
(
this
->
status
);
emit
loadChanged
(
this
,
state
.
load
/
10.0
f
);
emit
valueChanged
(
uasId
,
"Load"
,
"%"
,
((
float
)
state
.
load
)
/
1000.0
f
,
MG
::
TIME
::
getGroundTimeNow
());
stateAudio
=
" changed status to "
+
uasState
;
}
qDebug
()
<<
"1 SYSTEM MODE:"
<<
state
.
mode
;
qDebug
()
<<
"1 THIS MODE:"
<<
this
->
mode
;
//
qDebug() << "1 SYSTEM MODE:" << state.mode;
//
qDebug() << "1 THIS MODE:" << this->mode;
if
(
this
->
mode
!=
static_cast
<
unsigned
int
>
(
state
.
mode
))
{
modechanged
=
true
;
...
...
@@ -308,7 +309,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
modeChanged
(
this
->
getUASID
(),
mode
,
""
);
qDebug
()
<<
"2 SYSTEM MODE:"
<<
mode
;
//
qDebug() << "2 SYSTEM MODE:" << mode;
modeAudio
=
" is now in "
+
mode
;
}
...
...
@@ -333,6 +334,16 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// COMMUNICATIONS DROP RATE
emit
dropRateChanged
(
this
->
getUASID
(),
state
.
packet_drop
/
1000.0
f
);
//add for development
emit
remoteControlRSSIChanged
(
state
.
packet_drop
/
1000.0
f
);
float
en
=
state
.
packet_drop
/
1000.0
f
;
emit
remoteControlChannelRawChanged
(
0
,
en
);
//MAVLINK_MSG_ID_RC_CHANNELS_RAW
emit
remoteControlChannelScaledChanged
(
0
,
en
/
100.0
f
);
//MAVLINK_MSG_ID_RC_CHANNELS_SCALED
//qDebug() << __FILE__ << __LINE__ << "RCV LOSS: " << state.packet_drop;
// AUDIO
...
...
src/ui/MainWindow.cc
View file @
dffc01d6
...
...
@@ -537,30 +537,30 @@ void MainWindow::buildSlugsWidgets()
addToToolsMenu
(
rcViewDockWidget
,
tr
(
"Radio Control"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_RC_VIEW
,
Qt
::
BottomDockWidgetArea
);
}
//
if (!slugsDataWidget)
//
{
//
// Dialog widgets
//
slugsDataWidget = new QDockWidget(tr("Slugs Data"), this);
//
slugsDataWidget->setWidget( new SlugsDataSensorView(this));
//
slugsDataWidget->setObjectName("SLUGS_DATA_DOCK_WIDGET");
// addToToolsMenu (slugsDataWidget, tr("Telemetry Data"), SLOT(showToolWidget(
)), MENU_SLUGS_DATA, Qt::RightDockWidgetArea);
//
}
if
(
!
slugsDataWidget
)
{
// Dialog widgets
slugsDataWidget
=
new
QDockWidget
(
tr
(
"Slugs Data"
),
this
);
slugsDataWidget
->
setWidget
(
new
SlugsDataSensorView
(
this
));
slugsDataWidget
->
setObjectName
(
"SLUGS_DATA_DOCK_WIDGET"
);
addToToolsMenu
(
slugsDataWidget
,
tr
(
"Telemetry Data"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_SLUGS_DATA
,
Qt
::
RightDockWidgetArea
);
}
//
if (!slugsPIDControlWidget)
//
{
//
slugsPIDControlWidget = new QDockWidget(tr("Slugs PID Control"), this);
//
slugsPIDControlWidget->setWidget(new SlugsPIDControl(this));
//
slugsPIDControlWidget->setObjectName("SLUGS_PID_CONTROL_DOCK_WIDGET");
// addToToolsMenu (slugsPIDControlWidget, tr("PID Configuration"), SLOT(showToolWidget(
)), MENU_SLUGS_PID, Qt::LeftDockWidgetArea);
//
}
if
(
!
slugsPIDControlWidget
)
{
slugsPIDControlWidget
=
new
QDockWidget
(
tr
(
"Slugs PID Control"
),
this
);
slugsPIDControlWidget
->
setWidget
(
new
SlugsPIDControl
(
this
));
slugsPIDControlWidget
->
setObjectName
(
"SLUGS_PID_CONTROL_DOCK_WIDGET"
);
addToToolsMenu
(
slugsPIDControlWidget
,
tr
(
"PID Configuration"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_SLUGS_PID
,
Qt
::
LeftDockWidgetArea
);
}
//
if (!slugsHilSimWidget)
//
{
//
slugsHilSimWidget = new QDockWidget(tr("Slugs Hil Sim"), this);
//
slugsHilSimWidget->setWidget( new SlugsHilSim(this));
//
slugsHilSimWidget->setObjectName("SLUGS_HIL_SIM_DOCK_WIDGET");
// addToToolsMenu (slugsHilSimWidget, tr("HIL Sim Configuration"), SLOT(showToolWidget(
)), MENU_SLUGS_HIL, Qt::LeftDockWidgetArea);
//
}
if
(
!
slugsHilSimWidget
)
{
slugsHilSimWidget
=
new
QDockWidget
(
tr
(
"Slugs Hil Sim"
),
this
);
slugsHilSimWidget
->
setWidget
(
new
SlugsHilSim
(
this
));
slugsHilSimWidget
->
setObjectName
(
"SLUGS_HIL_SIM_DOCK_WIDGET"
);
addToToolsMenu
(
slugsHilSimWidget
,
tr
(
"HIL Sim Configuration"
),
SLOT
(
showToolWidget
(
bool
)),
MENU_SLUGS_HIL
,
Qt
::
LeftDockWidgetArea
);
}
// if (!slugsCamControlWidget)
// {
...
...
@@ -1024,7 +1024,10 @@ void MainWindow::connectSlugsWidgets()
slugsDataWidget
->
widget
(),
SLOT
(
setActiveUAS
(
UASInterface
*
)));
}
if
(
slugsPIDControlWidget
&&
slugsPIDControlWidget
->
widget
()){
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
slugsPIDControlWidget
->
widget
(),
SLOT
(
activeUasSet
(
UASInterface
*
)));
}
}
void
MainWindow
::
arrangeCommonCenterStack
()
...
...
@@ -1547,6 +1550,15 @@ void MainWindow::UASCreated(UASInterface* uas)
// Connect Slugs Actions
connectSlugsActions
();
// if(slugsDataWidget)
// {
// SlugsDataSensorView *mm = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
// if(mm)
// {
// mm->addUAS(uas);
// }
// }
// FIXME: This type checking might be redundant
// // if (slugsDataWidget) {
// // SlugsDataSensorView* dataWidget = dynamic_cast<SlugsDataSensorView*>(slugsDataWidget->widget());
...
...
src/ui/QGCRemoteControlView.cc
View file @
dffc01d6
This diff is collapsed.
Click to expand it.
src/ui/QGCRemoteControlView.h
View file @
dffc01d6
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Declaration of QGCRemoteControlView
* @author Lorenz Meier <mail@qgroundcontrol.org>
*/
#ifndef QGCREMOTECONTROLVIEW_H
#define QGCREMOTECONTROLVIEW_H
#include <QWidget>
#include <QVector>
#include <QPushButton>
#include "RadioCalibration/RadioCalibrationWindow.h"
namespace
Ui
{
class
QGCRemoteControlView
;
}
class
QVBoxLayout
;
class
QLabel
;
class
QProgressBar
;
class
QGCRemoteControlView
:
public
QWidget
{
Q_OBJECT
public:
QGCRemoteControlView
(
QWidget
*
parent
=
0
);
~
QGCRemoteControlView
();
public
slots
:
void
setUASId
(
int
id
);
void
setChannelRaw
(
int
channelId
,
float
raw
);
void
setChannelScaled
(
int
channelId
,
float
normalized
);
void
setRemoteRSSI
(
float
rssiNormalized
);
void
redraw
();
protected
slots
:
void
appendChannelWidget
(
int
channelId
);
protected:
void
changeEvent
(
QEvent
*
e
);
int
uasId
;
float
rssi
;
bool
updated
;
QVBoxLayout
*
channelLayout
;
QVector
<
int
>
raw
;
QVector
<
float
>
normalized
;
QVector
<
QLabel
*>
rawLabels
;
QVector
<
QProgressBar
*>
progressBars
;
QProgressBar
*
rssiBar
;
QLabel
*
nameLabel
;
QPushButton
*
calibrate
;
RadioCalibrationWindow
*
calibrationWindow
;
private:
Ui
::
QGCRemoteControlView
*
ui
;
};
#endif // QGCREMOTECONTROLVIEW_H
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Declaration of QGCRemoteControlView
* @author Lorenz Meier <mail@qgroundcontrol.org>
*/
#ifndef QGCREMOTECONTROLVIEW_H
#define QGCREMOTECONTROLVIEW_H
#include <QWidget>
#include <QVector>
#include <QPushButton>
#include "RadioCalibration/RadioCalibrationWindow.h"
namespace
Ui
{
class
QGCRemoteControlView
;
}
class
QVBoxLayout
;
class
QLabel
;
class
QProgressBar
;
class
QGCRemoteControlView
:
public
QWidget
{
Q_OBJECT
public:
QGCRemoteControlView
(
QWidget
*
parent
=
0
);
~
QGCRemoteControlView
();
public
slots
:
void
setUASId
(
int
id
);
void
setChannelRaw
(
int
channelId
,
float
raw
);
//void setChannelScaled(int channelId, float normalized);
void
setRemoteRSSI
(
float
rssiNormalized
);
void
redraw
();
protected
slots
:
void
appendChannelWidget
(
int
channelId
);
protected:
void
changeEvent
(
QEvent
*
e
);
int
uasId
;
float
rssi
;
bool
updated
;
QVBoxLayout
*
channelLayout
;
QVector
<
int
>
raw
;
QVector
<
float
>
normalized
;
QVector
<
QLabel
*>
rawLabels
;
QVector
<
QProgressBar
*>
progressBars
;
QProgressBar
*
rssiBar
;
QLabel
*
nameLabel
;
QPushButton
*
calibrate
;
RadioCalibrationWindow
*
calibrationWindow
;
private:
Ui
::
QGCRemoteControlView
*
ui
;
};
#endif // QGCREMOTECONTROLVIEW_H
src/ui/QGCRemoteControlView.ui
View file @
dffc01d6
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
QGCRemoteControlView
</class>
<widget
class=
"QWidget"
name=
"QGCRemoteControlView"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<widget
class=
"QPushButton"
name=
"pushButton"
>
<property
name=
"geometry"
>
<rect>
<x>
300
</x>
<y>
260
</y>
<width>
93
</width>
<height>
27
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Calibrate
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
270
</y>
<width>
171
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Remote Control detected
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
10
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 1
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
30
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 2
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
50
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 3
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
70
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 4
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
90
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 5
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_7"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
110
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 6
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_8"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
130
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 7
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_9"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
150
</y>
<width>
71
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Channel 8
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_10"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
170
</y>
<width>
62
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
RSSI
</string>
</property>
</widget>
<widget
class=
"QProgressBar"
name=
"chan1ProgressBar"
>
<property
name=
"geometry"
>
<rect>
<x>
200
</x>
<y>
10
</y>
<width>
118
</width>
<height>
16
</height>
</rect>
</property>
<property
name=
"minimum"
>
<number>
-100
</number>
</property>
<property
name=
"value"
>
<number>
0
</number>
</property>
<property
name=
"textVisible"
>
<bool>
true
</bool>