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
1d843f21
Commit
1d843f21
authored
Oct 29, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code
parent
fb43c442
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
202 deletions
+0
-202
QGCApplication.pro
QGCApplication.pro
+0
-3
UAS.cc
src/uas/UAS.cc
+0
-1
UAS.h
src/uas/UAS.h
+0
-12
UASInterface.h
src/uas/UASInterface.h
+0
-14
MainWindow.cc
src/ui/MainWindow.cc
+0
-1
QGCTabbedInfoView.cpp
src/ui/QGCTabbedInfoView.cpp
+0
-5
QGCTabbedInfoView.h
src/ui/QGCTabbedInfoView.h
+0
-2
UASRawStatusView.cpp
src/ui/UASRawStatusView.cpp
+0
-112
UASRawStatusView.h
src/ui/UASRawStatusView.h
+0
-28
UASRawStatusView.ui
src/ui/UASRawStatusView.ui
+0
-24
No files found.
QGCApplication.pro
View file @
1d843f21
...
@@ -200,7 +200,6 @@ FORMS += \
...
@@ -200,7 +200,6 @@ FORMS += \
src
/
ui
/
uas
/
UASQuickView
.
ui
\
src
/
ui
/
uas
/
UASQuickView
.
ui
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
ui
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
ui
\
src
/
ui
/
UASInfo
.
ui
\
src
/
ui
/
UASInfo
.
ui
\
src
/
ui
/
UASRawStatusView
.
ui
\
}
}
HEADERS
+=
\
HEADERS
+=
\
...
@@ -317,7 +316,6 @@ HEADERS += \
...
@@ -317,7 +316,6 @@ HEADERS += \
src
/
ui
/
uas
/
UASQuickViewItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
h
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
h
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
h
\
src
/
ui
/
UASRawStatusView
.
h
\
src
/
VehicleSetup
/
JoystickConfigController
.
h
\
src
/
VehicleSetup
/
JoystickConfigController
.
h
\
src
/
ViewWidgets
/
CustomCommandWidget
.
h
\
src
/
ViewWidgets
/
CustomCommandWidget
.
h
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
h
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
h
\
...
@@ -423,7 +421,6 @@ SOURCES += \
...
@@ -423,7 +421,6 @@ SOURCES += \
src
/
ui
/
uas
/
UASQuickViewItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
cc
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
cc
\
src
/
ui
/
UASRawStatusView
.
cpp
\
src
/
VehicleSetup
/
JoystickConfigController
.
cc
\
src
/
VehicleSetup
/
JoystickConfigController
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidget
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidget
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
cc
\
...
...
src/uas/UAS.cc
View file @
1d843f21
...
@@ -59,7 +59,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
...
@@ -59,7 +59,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
receiveDropRate
(
0
),
receiveDropRate
(
0
),
sendDropRate
(
0
),
sendDropRate
(
0
),
autopilot
(
vehicle
->
firmwareType
()),
base_mode
(
0
),
base_mode
(
0
),
custom_mode
(
0
),
custom_mode
(
0
),
status
(
-
1
),
status
(
-
1
),
...
...
src/uas/UAS.h
View file @
1d843f21
...
@@ -368,7 +368,6 @@ protected: //COMMENTS FOR TEST UNIT
...
@@ -368,7 +368,6 @@ protected: //COMMENTS FOR TEST UNIT
QTimer
statusTimeout
;
///< Timer for various status timeouts
QTimer
statusTimeout
;
///< Timer for various status timeouts
/// BASIC UAS TYPE, NAME AND STATE
/// BASIC UAS TYPE, NAME AND STATE
int
autopilot
;
///< Type of the Autopilot: -1: None, 0: Generic, 1: PIXHAWK, 2: SLUGS, 3: Ardupilot (up to 15 types), defined in MAV_AUTOPILOT_TYPE ENUM
uint8_t
base_mode
;
///< The current mode of the MAV
uint8_t
base_mode
;
///< The current mode of the MAV
uint32_t
custom_mode
;
///< The current mode of the MAV
uint32_t
custom_mode
;
///< The current mode of the MAV
int
status
;
///< The current status of the MAV
int
status
;
///< The current status of the MAV
...
@@ -479,8 +478,6 @@ protected: //COMMENTS FOR TEST UNIT
...
@@ -479,8 +478,6 @@ protected: //COMMENTS FOR TEST UNIT
#endif
#endif
public:
public:
/** @brief Set the current battery type */
void
setBattery
(
BatteryType
type
,
int
cells
);
/** @brief Get the current charge level */
/** @brief Get the current charge level */
float
getChargeLevel
();
float
getChargeLevel
();
/** @brief Get the human-readable status message for this code */
/** @brief Get the human-readable status message for this code */
...
@@ -499,17 +496,8 @@ public:
...
@@ -499,17 +496,8 @@ public:
QImage
getImage
();
QImage
getImage
();
void
requestImage
();
void
requestImage
();
int
getAutopilotType
(){
return
autopilot
;
}
public
slots
:
public
slots
:
/** @brief Set the autopilot type */
void
setAutopilotType
(
int
apType
)
{
autopilot
=
apType
;
emit
systemSpecsChanged
(
uasId
);
}
/** @brief Executes a command with 7 params */
/** @brief Executes a command with 7 params */
void
executeCommand
(
MAV_CMD
command
,
int
confirmation
,
float
param1
,
float
param2
,
float
param3
,
float
param4
,
float
param5
,
float
param6
,
float
param7
,
int
component
);
void
executeCommand
(
MAV_CMD
command
,
int
confirmation
,
float
param1
,
float
param2
,
float
param3
,
float
param4
,
float
param5
,
float
param6
,
float
param7
,
int
component
);
...
...
src/uas/UASInterface.h
View file @
1d843f21
...
@@ -43,16 +43,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -43,16 +43,6 @@ This file is part of the QGROUNDCONTROL project
class
FileManager
;
class
FileManager
;
enum
BatteryType
{
NICD
=
0
,
NIMH
=
1
,
LIION
=
2
,
LIPOLY
=
3
,
LIFE
=
4
,
AGZN
=
5
};
///< The type of battery used
/**
/**
* @brief Interface for all robots.
* @brief Interface for all robots.
*
*
...
@@ -122,10 +112,6 @@ public:
...
@@ -122,10 +112,6 @@ public:
return
colors
[
nextColor
];
//return the next color
return
colors
[
nextColor
];
//return the next color
}
}
/** @brief Get the type of the autopilot (PIXHAWK, APM, UDB, PPZ,..) */
virtual
int
getAutopilotType
()
=
0
;
virtual
void
setAutopilotType
(
int
apType
)
=
0
;
virtual
QMap
<
int
,
QString
>
getComponents
()
=
0
;
virtual
QMap
<
int
,
QString
>
getComponents
()
=
0
;
QColor
getColor
()
QColor
getColor
()
...
...
src/ui/MainWindow.cc
View file @
1d843f21
...
@@ -60,7 +60,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -60,7 +60,6 @@ This file is part of the QGROUNDCONTROL project
#include "QGCUASFileViewMulti.h"
#include "QGCUASFileViewMulti.h"
#include "UASQuickView.h"
#include "UASQuickView.h"
#include "QGCTabbedInfoView.h"
#include "QGCTabbedInfoView.h"
#include "UASRawStatusView.h"
#include "CustomCommandWidget.h"
#include "CustomCommandWidget.h"
#include "QGCDockWidget.h"
#include "QGCDockWidget.h"
#include "UASInfoWidget.h"
#include "UASInfoWidget.h"
...
...
src/ui/QGCTabbedInfoView.cpp
View file @
1d843f21
...
@@ -6,12 +6,8 @@ QGCTabbedInfoView::QGCTabbedInfoView(const QString& title, QAction* action, QWid
...
@@ -6,12 +6,8 @@ QGCTabbedInfoView::QGCTabbedInfoView(const QString& title, QAction* action, QWid
{
{
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
messageView
=
new
UASMessageViewWidget
(
qgcApp
()
->
toolbox
()
->
uasMessageHandler
(),
this
);
messageView
=
new
UASMessageViewWidget
(
qgcApp
()
->
toolbox
()
->
uasMessageHandler
(),
this
);
//actionsWidget = new UASActionsWidget(this);
quickView
=
new
UASQuickView
(
this
);
quickView
=
new
UASQuickView
(
this
);
//rawView = new UASRawStatusView(this);
ui
.
tabWidget
->
addTab
(
quickView
,
"Quick"
);
ui
.
tabWidget
->
addTab
(
quickView
,
"Quick"
);
//ui.tabWidget->addTab(actionsWidget,"Actions");
//ui.tabWidget->addTab(rawView,"Status");
ui
.
tabWidget
->
addTab
(
messageView
,
"Messages"
);
ui
.
tabWidget
->
addTab
(
messageView
,
"Messages"
);
loadSettings
();
loadSettings
();
...
@@ -19,7 +15,6 @@ QGCTabbedInfoView::QGCTabbedInfoView(const QString& title, QAction* action, QWid
...
@@ -19,7 +15,6 @@ QGCTabbedInfoView::QGCTabbedInfoView(const QString& title, QAction* action, QWid
void
QGCTabbedInfoView
::
addSource
(
MAVLinkDecoder
*
decoder
)
void
QGCTabbedInfoView
::
addSource
(
MAVLinkDecoder
*
decoder
)
{
{
m_decoder
=
decoder
;
m_decoder
=
decoder
;
//rawView->addSource(decoder);
quickView
->
addSource
(
decoder
);
quickView
->
addSource
(
decoder
);
}
}
...
...
src/ui/QGCTabbedInfoView.h
View file @
1d843f21
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
#include "MAVLinkDecoder.h"
#include "MAVLinkDecoder.h"
#include "UASMessageView.h"
#include "UASMessageView.h"
#include "UASQuickView.h"
#include "UASQuickView.h"
#include "UASRawStatusView.h"
#include "ui_QGCTabbedInfoView.h"
#include "ui_QGCTabbedInfoView.h"
...
@@ -22,7 +21,6 @@ private:
...
@@ -22,7 +21,6 @@ private:
Ui
::
QGCTabbedInfoView
ui
;
Ui
::
QGCTabbedInfoView
ui
;
UASMessageViewWidget
*
messageView
;
UASMessageViewWidget
*
messageView
;
UASQuickView
*
quickView
;
UASQuickView
*
quickView
;
UASRawStatusView
*
rawView
;
};
};
#endif // QGCTABBEDINFOVIEW_H
#endif // QGCTABBEDINFOVIEW_H
src/ui/UASRawStatusView.cpp
deleted
100644 → 0
View file @
fb43c442
#include "UASRawStatusView.h"
#include "MAVLinkDecoder.h"
#include "UASInterface.h"
#include "UAS.h"
#include <QTimer>
#include <QScrollBar>
UASRawStatusView
::
UASRawStatusView
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
ui
.
tableWidget
->
setColumnCount
(
2
);
ui
.
tableWidget
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
ui
.
tableWidget
->
setShowGrid
(
false
);
ui
.
tableWidget
->
setEditTriggers
(
QAbstractItemView
::
NoEditTriggers
);
QTimer
*
timer
=
new
QTimer
(
this
);
connect
(
timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
updateTableTimerTick
()));
// FIXME reinstate once fixed.
//timer->start(2000);
}
void
UASRawStatusView
::
addSource
(
MAVLinkDecoder
*
decoder
)
{
connect
(
decoder
,
SIGNAL
(
valueChanged
(
int
,
QString
,
QString
,
QVariant
,
quint64
)),
this
,
SLOT
(
valueChanged
(
int
,
QString
,
QString
,
QVariant
,
quint64
)));
}
void
UASRawStatusView
::
valueChanged
(
const
int
uasId
,
const
QString
&
name
,
const
QString
&
unit
,
const
QVariant
&
variant
,
const
quint64
msec
)
{
Q_UNUSED
(
uasId
);
Q_UNUSED
(
unit
);
Q_UNUSED
(
msec
);
bool
ok
;
double
value
=
variant
.
toDouble
(
&
ok
);
QMetaType
::
Type
type
=
static_cast
<
QMetaType
::
Type
>
(
variant
.
type
());
if
(
!
ok
||
type
==
QMetaType
::
QString
||
type
==
QMetaType
::
QByteArray
)
return
;
valueMap
[
name
]
=
value
;
if
(
nameToUpdateWidgetMap
.
contains
(
name
))
{
nameToUpdateWidgetMap
[
name
]
->
setText
(
QString
::
number
(
value
));
}
else
{
m_tableDirty
=
true
;
}
return
;
}
void
UASRawStatusView
::
resizeEvent
(
QResizeEvent
*
event
)
{
Q_UNUSED
(
event
);
m_tableDirty
=
true
;
}
void
UASRawStatusView
::
updateTableTimerTick
()
{
if
(
m_tableDirty
)
{
m_tableDirty
=
false
;
int
columncount
=
2
;
bool
good
=
false
;
while
(
!
good
)
{
ui
.
tableWidget
->
clear
();
ui
.
tableWidget
->
setRowCount
(
0
);
ui
.
tableWidget
->
setColumnCount
(
columncount
);
ui
.
tableWidget
->
horizontalHeader
()
->
hide
();
ui
.
tableWidget
->
verticalHeader
()
->
hide
();
int
currcolumn
=
0
;
int
currrow
=
0
;
int
totalheight
=
2
+
ui
.
tableWidget
->
horizontalScrollBar
()
->
height
();
bool
broke
=
false
;
for
(
QMap
<
QString
,
double
>::
const_iterator
i
=
valueMap
.
constBegin
();
i
!=
valueMap
.
constEnd
();
i
++
)
{
if
(
ui
.
tableWidget
->
rowCount
()
<
currrow
+
1
)
{
ui
.
tableWidget
->
setRowCount
(
currrow
+
1
);
}
ui
.
tableWidget
->
setItem
(
currrow
,
currcolumn
,
new
QTableWidgetItem
(
i
.
key
().
split
(
"."
)[
1
]));
QTableWidgetItem
*
item
=
new
QTableWidgetItem
(
QString
::
number
(
i
.
value
()));
nameToUpdateWidgetMap
[
i
.
key
()]
=
item
;
ui
.
tableWidget
->
setItem
(
currrow
,
currcolumn
+
1
,
item
);
ui
.
tableWidget
->
resizeRowToContents
(
currrow
);
totalheight
+=
ui
.
tableWidget
->
rowHeight
(
currrow
);
currrow
++
;
if
((
totalheight
+
ui
.
tableWidget
->
rowHeight
(
currrow
-
1
))
>
ui
.
tableWidget
->
height
())
{
currcolumn
+=
2
;
totalheight
=
2
+
ui
.
tableWidget
->
horizontalScrollBar
()
->
height
();
currrow
=
0
;
if
(
currcolumn
>=
columncount
)
{
//We're over what we can do. Add a column and continue.
columncount
+=
2
;
broke
=
true
;
i
=
valueMap
.
constEnd
();
// Ensure loop breakout.
break
;
}
}
}
if
(
!
broke
)
{
good
=
true
;
}
}
ui
.
tableWidget
->
resizeColumnsToContents
();
//ui.tableWidget->columnCount()-2
}
}
UASRawStatusView
::~
UASRawStatusView
()
{
}
src/ui/UASRawStatusView.h
deleted
100644 → 0
View file @
fb43c442
#ifndef UASRAWSTATUSVIEW_H
#define UASRAWSTATUSVIEW_H
#include <QWidget>
#include "MAVLinkDecoder.h"
#include "ui_UASRawStatusView.h"
class
UASRawStatusView
:
public
QWidget
{
Q_OBJECT
public:
explicit
UASRawStatusView
(
QWidget
*
parent
=
0
);
~
UASRawStatusView
();
void
addSource
(
MAVLinkDecoder
*
decoder
);
private
slots
:
void
updateTableTimerTick
();
void
valueChanged
(
const
int
uasId
,
const
QString
&
name
,
const
QString
&
unit
,
const
QVariant
&
value
,
const
quint64
msec
);
protected:
void
resizeEvent
(
QResizeEvent
*
event
);
private:
QMap
<
QString
,
double
>
valueMap
;
QMap
<
QString
,
QTableWidgetItem
*>
nameToUpdateWidgetMap
;
Ui
::
UASRawStatusView
ui
;
bool
m_tableDirty
;
};
#endif // UASRAWSTATUSVIEW_H
src/ui/UASRawStatusView.ui
deleted
100644 → 0
View file @
fb43c442
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
UASRawStatusView
</class>
<widget
class=
"QWidget"
name=
"UASRawStatusView"
>
<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>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QTableWidget"
name=
"tableWidget"
/>
</item>
</layout>
</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