Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c3260557
Commit
c3260557
authored
May 12, 2015
by
Don Gagne
Browse files
Remove DebugConsole
parent
325daa81
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
QGCApplication.pro
View file @
c3260557
...
...
@@ -164,7 +164,6 @@ INCLUDEPATH += \
FORMS
+=
\
src
/
QGCQmlWidgetHolder
.
ui
\
src
/
ui
/
DebugConsole
.
ui
\
src
/
ui
/
HDDisplay
.
ui
\
src
/
ui
/
Linechart
.
ui
\
src
/
ui
/
MainWindow
.
ui
\
...
...
@@ -272,7 +271,6 @@ HEADERS += \
src
/
uas
/
UASManagerInterface
.
h
\
src
/
uas
/
UASMessageHandler
.
h
\
src
/
uas
/
UASWaypointManager
.
h
\
src
/
ui
/
DebugConsole
.
h
\
src
/
ui
/
flightdisplay
/
FlightDisplay
.
h
\
src
/
ui
/
HDDisplay
.
h
\
src
/
ui
/
HSIDisplay
.
h
\
...
...
@@ -399,7 +397,6 @@ SOURCES += \
src
/
uas
/
UASManager
.
cc
\
src
/
uas
/
UASMessageHandler
.
cc
\
src
/
uas
/
UASWaypointManager
.
cc
\
src
/
ui
/
DebugConsole
.
cc
\
src
/
ui
/
flightdisplay
/
FlightDisplay
.
cc
\
src
/
ui
/
HDDisplay
.
cc
\
src
/
ui
/
HSIDisplay
.
cc
\
...
...
src/ui/DebugConsole.cc
deleted
100644 → 0
View file @
325daa81
This diff is collapsed.
Click to expand it.
src/ui/DebugConsole.h
deleted
100644 → 0
View file @
325daa81
/*=====================================================================
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 Debug console
*
* @author Lorenz Meier <mavteam@student.ethz.ch>
*
*/
#ifndef DEBUGCONSOLE_H
#define DEBUGCONSOLE_H
#include
<QWidget>
#include
<QList>
#include
<QByteArray>
#include
<QTimer>
#include
<QKeyEvent>
#include
"LinkInterface.h"
namespace
Ui
{
class
DebugConsole
;
}
class
UASInterface
;
/**
* @brief Shows a debug console
*
* This class shows the raw data stream of each link
* and the debug / text messages sent by all systems
*/
class
DebugConsole
:
public
QWidget
{
Q_OBJECT
public:
DebugConsole
(
QWidget
*
parent
=
0
);
~
DebugConsole
();
public
slots
:
/** @brief Add a link to the list of monitored links */
void
addLink
(
LinkInterface
*
link
);
/** @brief Add a UAS to the list of monitored UAS */
void
uasCreated
(
UASInterface
*
uas
);
/** @brief Remove a link from the list */
void
removeLink
(
LinkInterface
*
link
);
/** @brief Update a link name */
void
updateLinkName
(
QString
name
);
/** @brief Select a link for the active view */
void
linkSelected
(
int
linkId
);
/** @brief Receive bytes from link */
void
receiveBytes
(
LinkInterface
*
link
,
QByteArray
bytes
);
/** @brief Send lineedit content over link */
void
sendBytes
();
/** @brief Enable HEX display mode */
void
hexModeEnabled
(
bool
mode
);
/** @brief Filter out MAVLINK raw data */
void
MAVLINKfilterEnabled
(
bool
filter
);
/** @brief Freeze input, do not store new incoming data */
void
hold
(
bool
hold
);
/** @brief Handle the connect button */
void
handleConnectButton
();
/** @brief Enable auto-freeze mode if traffic intensity is too high to display */
void
setAutoHold
(
bool
hold
);
/** @brief Receive plain text message to output to the user */
void
receiveTextMessage
(
int
id
,
int
component
,
int
severity
,
QString
text
);
/** @brief Append a special symbol */
void
appendSpecialSymbol
(
const
QString
&
text
);
/** @brief Append the special symbol currently selected in combo box */
void
appendSpecialSymbol
();
/** @brief A new special symbol is selected */
void
specialSymbolSelected
(
const
QString
&
text
);
void
linkStatusUpdate
(
const
QString
&
name
,
const
QString
&
text
);
protected
slots
:
/** @brief Draw information overlay */
void
paintEvent
(
QPaintEvent
*
event
);
/** @brief Update traffic measurements */
void
updateTrafficMeasurements
();
void
loadSettings
();
void
storeSettings
();
protected:
void
changeEvent
(
QEvent
*
e
);
void
hideEvent
(
QHideEvent
*
event
);
/** @brief Convert a symbol name to the byte representation */
QByteArray
symbolNameToBytes
(
const
QString
&
symbol
);
/** @brief Convert a symbol byte to the name */
QString
bytesToSymbolNames
(
const
QByteArray
&
b
);
/** @brief Handle keypress events */
void
keyPressEvent
(
QKeyEvent
*
event
);
/** @brief Cycle through the command history */
void
cycleCommandHistory
(
bool
up
);
LinkInterface
*
currLink
;
bool
holdOn
;
///< Hold current view, ignore new data
bool
convertToAscii
;
///< Convert data to ASCII
bool
filterMAVLINK
;
///< Set true to filter out MAVLink in output
bool
autoHold
;
///< Auto-hold mode sets view into hold if the data rate is too high
int
bytesToIgnore
;
///< Number of bytes to ignore
char
lastByte
;
///< The last received byte
bool
escReceived
;
///< True if received ESC char in ASCII mode
int
escIndex
;
///< Index of bytes since ESC was received
char
escBytes
[
5
];
///< Escape-following bytes
bool
terminalReceived
;
///< Terminal sequence received
QList
<
QString
>
sentBytes
;
///< Transmitted bytes, per transmission
QByteArray
holdBuffer
;
///< Buffer where bytes are stored during hold-enable
QString
lineBuffer
;
///< Buffere where bytes are stored before writing them out
quint64
lastLineBuffer
;
///< Last line buffer emission time
QTimer
lineBufferTimer
;
///< Line buffer timer
QTimer
snapShotTimer
;
///< Timer for measuring traffic snapshots
static
const
int
snapShotInterval
=
500
;
///< Set the time between UI updates for the data rate (ms)
float
lowpassInDataRate
;
///< Lowpass filtered data rate (kilobytes/s)
static
const
float
inDataRateThreshold
;
///< Threshold where to enable auto-hold (kilobytes/s)
float
lowpassOutDataRate
;
///< Low-pass filtered outgoing data rate (kilobytes/s)
QStringList
commandHistory
;
QString
currCommand
;
int
commandIndex
;
private
slots
:
void
_linkConnected
(
void
);
void
_linkDisconnected
(
void
);
private:
/** @brief Set connection state of the current link */
void
_setConnectionState
(
bool
);
/// List of all links we are keeping track of. We keep SharedLinkInterface objects
/// which are QSharedPointer's in order to maintain reference counts. Otherwise signals
/// can get out of order and the link may be deleted before we clean up our side.
QList
<
SharedLinkInterface
>
_links
;
Ui
::
DebugConsole
*
m_ui
;
};
#endif // DEBUGCONSOLE_H
src/ui/DebugConsole.ui
deleted
100644 → 0
View file @
325daa81
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
DebugConsole
</class>
<widget
class=
"QWidget"
name=
"DebugConsole"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
570
</width>
<height>
211
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"0,0"
>
<property
name=
"horizontalSpacing"
>
<number>
6
</number>
</property>
<property
name=
"verticalSpacing"
>
<number>
4
</number>
</property>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
stretch=
"10,0,0,0,0,0,0,0,0"
>
<item>
<widget
class=
"QComboBox"
name=
"linkComboBox"
>
<property
name=
"maximumSize"
>
<size>
<width>
130
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Select the link to monitor
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"downArrow"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
12
</width>
<height>
16
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
12
</width>
<height>
16
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
12
</width>
<height>
16
</height>
</size>
</property>
<property
name=
"autoFillBackground"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap
resource=
"../../qgroundcontrol.qrc"
>
:/res/DownArrow
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"downSpeedLabel"
>
<property
name=
"text"
>
<string>
00.0 kB/s
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"upArrow"
>
<property
name=
"maximumSize"
>
<size>
<width>
12
</width>
<height>
16
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap
resource=
"../../qgroundcontrol.qrc"
>
:/res/UpArrow
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"upSpeedLabel"
>
<property
name=
"text"
>
<string>
00.0 kB/s
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"mavlinkCheckBox"
>
<property
name=
"toolTip"
>
<string>
Ignore MAVLINK protocol messages in display
</string>
</property>
<property
name=
"statusTip"
>
<string>
Ignore MAVLINK protocol messages in display
</string>
</property>
<property
name=
"text"
>
<string>
Hide MAVLink
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"hexCheckBox"
>
<property
name=
"toolTip"
>
<string>
Display and enter bytes in HEX representation (e.g. 0xAA)
</string>
</property>
<property
name=
"statusTip"
>
<string>
Display and enter bytes in HEX representation (e.g. 0xAA)
</string>
</property>
<property
name=
"text"
>
<string>
HEX
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"holdCheckBox"
>
<property
name=
"toolTip"
>
<string>
Saves CPU ressources, automatically set view to hold if data rate is too high to prevent fast scrolling
</string>
</property>
<property
name=
"statusTip"
>
<string>
Saves CPU ressources, automatically set view to hold if data rate is too high to prevent fast scrolling
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Enable auto hold to lower the CPU consumption
</string>
</property>
<property
name=
"text"
>
<string>
Auto Hold
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"QPlainTextEdit"
name=
"receiveText"
>
<property
name=
"minimumSize"
>
<size>
<width>
300
</width>
<height>
50
</height>
</size>
</property>
<property
name=
"readOnly"
>
<bool>
true
</bool>
</property>
<property
name=
"tabStopWidth"
>
<number>
60
</number>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLineEdit"
name=
"sentText"
>
<property
name=
"text"
>
<string>
Enter data/text below to send
</string>
</property>
<property
name=
"readOnly"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"100,0,0,1,10,1,1,1"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
<item>
<widget
class=
"QComboBox"
name=
"specialComboBox"
>
<property
name=
"maximumSize"
>
<size>
<width>
100
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"maxVisibleItems"
>
<number>
10
</number>
</property>
<property
name=
"sizeAdjustPolicy"
>
<enum>
QComboBox::AdjustToContentsOnFirstShow
</enum>
</property>
<property
name=
"minimumContentsLength"
>
<number>
1
</number>
</property>
<item>
<property
name=
"text"
>
<string>
Add..
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
CR+LF
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
LF
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
FF
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
CR
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
TAB
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
ESC
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
~
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
<
Space
>
</string>
</property>
</item>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"addSymbolButton"
>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../qgroundcontrol.qrc"
>
<normaloff>
:/res/PlusSign
</normaloff>
:/res/PlusSign
</iconset>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"specialCheckBox"
>
<property
name=
"toolTip"
>
<string>
Automatically send special char at end of message
</string>
</property>
<property
name=
"text"
>
<string>
Auto-Add
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"transmitButton"
>
<property
name=
"toolTip"
>
<string>
Send the ASCII text or HEX values over the link
</string>
</property>
<property
name=
"text"
>
<string>
Send
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
5
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"holdButton"
>
<property
name=
"text"
>
<string>
Hold
</string>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"clearButton"
>
<property
name=
"text"
>
<string>
Clear
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"connectButton"
>
<property
name=
"text"
>
<string>
Disconn.
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"3"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLineEdit"
name=
"sendText"
>
<property
name=
"minimumSize"
>
<size>
<width>
80
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"toolTip"
>
<string>
Type the bytes to send here, use 0xAA format for HEX (Check HEX checkbox above)
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include
location=
"../../qgroundcontrol.qrc"
/>
</resources>
<connections>
<connection>
<sender>
clearButton
</sender>
<signal>
clicked()
</signal>
<receiver>
receiveText
</receiver>
<slot>
clear()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
356
</x>
<y>
278
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
199
</x>
<y>
146
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
src/ui/MainWindow.cc
View file @
c3260557
...
...
@@ -117,7 +117,6 @@ const char* MainWindow::_hdd2DockWidgetName = "HEAD_DOWN_DISPLAY_2_DOCKWIDGET";
const
char
*
MainWindow
::
_pfdDockWidgetName
=
"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET"
;
const
char
*
MainWindow
::
_hudDockWidgetName
=
"HEAD_UP_DISPLAY_DOCKWIDGET"
;
const
char
*
MainWindow
::
_uasInfoViewDockWidgetName
=
"UAS_INFO_INFOVIEW_DOCKWIDGET"
;
const
char
*
MainWindow
::
_debugConsoleDockWidgetName
=
"COMMUNICATION_CONSOLE_DOCKWIDGET"
;
static
MainWindow
*
_instance
=
NULL
;
///< @brief MainWindow singleton
...
...
@@ -441,7 +440,6 @@ void MainWindow::_buildCommonWidgets(void)
{
_pfdDockWidgetName
,
"Primary Flight Display"
,
Qt
::
RightDockWidgetArea
},
{
_hudDockWidgetName
,
"Video Downlink"
,
Qt
::
RightDockWidgetArea
},
{
_uasInfoViewDockWidgetName
,
"Info View"
,
Qt
::
LeftDockWidgetArea
},
{
_debugConsoleDockWidgetName
,
"Communications Console"
,
Qt
::
LeftDockWidgetArea
},
};
static
const
size_t
cDockWidgetInfo
=
sizeof
(
rgDockWidgetInfo
)
/
sizeof
(
rgDockWidgetInfo
[
0
]);
...
...
@@ -574,8 +572,6 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
QGCTabbedInfoView
*
pInfoView
=
new
QGCTabbedInfoView
(
this
);
pInfoView
->
addSource
(
mavlinkDecoder
);
widget
=
pInfoView
;
}
else
if
(
widgetName
==
_debugConsoleDockWidgetName
)
{
widget
=
new
DebugConsole
(
this
);
}
else
{
qWarning
()
<<
"Attempt to create unknown Inner Dock Widget"
<<
widgetName
;
}
...
...
src/ui/MainWindow.h
View file @
c3260557
...
...
@@ -53,7 +53,6 @@ This file is part of the QGROUNDCONTROL project
#if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX)
#include
"Mouse6dofInput.h"
#endif // QGC_MOUSE_ENABLED_WIN
#include
"DebugConsole.h"
#include
"ParameterEditorWidget.h"
#include
"HDDisplay.h"
#include
"HSIDisplay.h"
...
...
@@ -332,7 +331,6 @@ private:
static
const
char
*
_pfdDockWidgetName
;
static
const
char
*
_hudDockWidgetName
;
static
const
char
*
_uasInfoViewDockWidgetName
;
static
const
char
*
_debugConsoleDockWidgetName
;
QMap
<
QString
,
QDockWidget
*>
_mapName2DockWidget
;
QMap
<
int
,
QDockWidget
*>
_mapUasId2HilDockWidget
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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