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
5dcdc1ec
Commit
5dcdc1ec
authored
Jan 24, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed CRLF, fixed some graphic issues, improved other minor things
parent
fc44c0c2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
21 deletions
+63
-21
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+1
-0
UASInterface.h
src/uas/UASInterface.h
+9
-8
DebugConsole.cc
src/ui/DebugConsole.cc
+25
-8
DebugConsole.h
src/ui/DebugConsole.h
+2
-0
DebugConsole.ui
src/ui/DebugConsole.ui
+12
-2
UASView.ui
src/ui/UASView.ui
+8
-2
QGCToolWidget.cc
src/ui/designer/QGCToolWidget.cc
+3
-0
MAV2DIcon.cc
src/ui/map/MAV2DIcon.cc
+1
-0
UASView.cc
src/ui/uas/UASView.cc
+2
-1
No files found.
src/comm/MAVLinkSimulationLink.cc
View file @
5dcdc1ec
...
...
@@ -957,6 +957,7 @@ bool MAVLinkSimulationLink::connect()
start
(
LowPriority
);
MAVLinkSimulationMAV
*
mav1
=
new
MAVLinkSimulationMAV
(
this
,
1
);
MAVLinkSimulationMAV
*
mav3
=
new
MAVLinkSimulationMAV
(
this
,
2
);
Q_UNUSED
(
mav1
);
// timer->start(rate);
return
true
;
...
...
src/uas/UASInterface.h
View file @
5dcdc1ec
...
...
@@ -103,14 +103,15 @@ public:
enum
Airframe
{
QGC_AIRFRAME_GENERIC
=
0
,
QGC_AIRFRAME_EASYSTAR
=
1
,
QGC_AIRFRAME_TWINSTAR
=
2
,
QGC_AIRFRAME_MERLIN
=
3
,
QGC_AIRFRAME_CHEETAH
=
4
,
QGC_AIRFRAME_MIKROKOPTER
=
5
,
QGC_AIRFRAME_REAPER
=
6
,
QGC_AIRFRAME_PREDATOR
=
7
,
QGC_AIRFRAME_COAXIAL
=
8
QGC_AIRFRAME_EASYSTAR
,
QGC_AIRFRAME_TWINSTAR
,
QGC_AIRFRAME_MERLIN
,
QGC_AIRFRAME_CHEETAH
,
QGC_AIRFRAME_MIKROKOPTER
,
QGC_AIRFRAME_REAPER
,
QGC_AIRFRAME_PREDATOR
,
QGC_AIRFRAME_COAXIAL
,
QGC_AIRFRAME_PTERYX
};
/**
...
...
src/ui/DebugConsole.cc
View file @
5dcdc1ec
...
...
@@ -64,6 +64,8 @@ DebugConsole::DebugConsole(QWidget *parent) :
m_ui
->
setupUi
(
this
);
// Hide sent text field - it is only useful after send has been hit
m_ui
->
sentText
->
setVisible
(
false
);
// Hide auto-send checkbox
m_ui
->
specialCheckBox
->
setVisible
(
false
);
// Make text area not editable
m_ui
->
receiveText
->
setReadOnly
(
true
);
// Limit to 500 lines
...
...
@@ -109,6 +111,8 @@ DebugConsole::DebugConsole(QWidget *parent) :
connect
(
m_ui
->
connectButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
handleConnectButton
()));
// Connect the special chars combo box
connect
(
m_ui
->
addSymbolButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
appendSpecialSymbol
()));
// Connect Checkbox
connect
(
m_ui
->
specialComboBox
,
SIGNAL
(
highlighted
(
QString
)),
this
,
SLOT
(
specialSymbolSelected
(
QString
)));
hold
(
false
);
...
...
@@ -270,7 +274,7 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
for
(
int
j
=
0
;
j
<
bytes
.
size
();
j
++
)
{
unsigned
char
byte
=
bytes
.
at
(
j
);
// Filter MAVLink (http://pixhawk.ethz.ch/
mavlink
) messages out of the stream.
// Filter MAVLink (http://pixhawk.ethz.ch/
wiki/mavlink/
) messages out of the stream.
if
(
filterMAVLINK
&&
bytes
.
size
()
>
1
)
{
// Filtering is done by setting an ignore counter based on the MAVLINK packet length
...
...
@@ -288,12 +292,13 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
switch
(
byte
)
{
// Catch line feed
case
(
unsigned
char
)
'\n'
:
m_ui
->
receiveText
->
appendPlainText
(
str
);
str
=
""
;
break
;
// Catch carriage return
case
(
unsigned
char
)
'\r'
:
// case (unsigned char)'\n':
// m_ui->receiveText->appendPlainText(str);
// str = "";
// break;
// Catch carriage return and line feed
case
(
unsigned
char
)
0xD
:
case
(
unsigned
char
)
0xA
:
// Ignore
break
;
default:
...
...
@@ -323,7 +328,7 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
}
}
m_ui
->
receiveText
->
appendPlainText
(
lineBuffer
);
if
(
lineBuffer
.
length
()
>
0
)
m_ui
->
receiveText
->
appendPlainText
(
lineBuffer
);
lineBuffer
.
clear
();
}
...
...
@@ -376,6 +381,12 @@ QByteArray DebugConsole::symbolNameToBytes(const QString& text)
return
b
;
}
void
DebugConsole
::
specialSymbolSelected
(
const
QString
&
text
)
{
Q_UNUSED
(
text
);
m_ui
->
specialCheckBox
->
setVisible
(
true
);
}
void
DebugConsole
::
appendSpecialSymbol
(
const
QString
&
text
)
{
QString
line
=
m_ui
->
sendText
->
text
();
...
...
@@ -415,6 +426,12 @@ void DebugConsole::sendBytes()
return
;
}
// Append special symbol if checkbox is checked
if
(
m_ui
->
specialCheckBox
->
isChecked
())
{
appendSpecialSymbol
(
m_ui
->
specialComboBox
->
currentText
());
}
QByteArray
transmit
;
QString
feedback
;
bool
ok
=
true
;
...
...
src/ui/DebugConsole.h
View file @
5dcdc1ec
...
...
@@ -87,6 +87,8 @@ public slots:
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
);
protected
slots
:
/** @brief Draw information overlay */
...
...
src/ui/DebugConsole.ui
View file @
5dcdc1ec
...
...
@@ -6,7 +6,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
46
9
</width>
<width>
46
6
</width>
<height>
190
</height>
</rect>
</property>
...
...
@@ -120,7 +120,7 @@
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"100,0,1,10,1,1,1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"100,0,
0,
1,10,1,1,1"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
...
...
@@ -204,6 +204,16 @@
</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"
>
...
...
src/ui/UASView.ui
View file @
5dcdc1ec
...
...
@@ -6,12 +6,12 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
31
0
</width>
<width>
26
0
</width>
<height>
111
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"M
aximum
"
vsizetype=
"Fixed"
>
<sizepolicy
hsizetype=
"M
inimumExpanding
"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
...
...
@@ -22,6 +22,12 @@
<height>
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
360
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
...
...
src/ui/designer/QGCToolWidget.cc
View file @
5dcdc1ec
...
...
@@ -221,6 +221,7 @@ void QGCToolWidget::addParam()
if
(
ui
->
hintLabel
)
{
ui
->
hintLabel
->
deleteLater
();
ui
->
hintLabel
=
NULL
;
}
toolLayout
->
addWidget
(
slider
);
slider
->
startEditMode
();
...
...
@@ -232,6 +233,7 @@ void QGCToolWidget::addAction()
if
(
ui
->
hintLabel
)
{
ui
->
hintLabel
->
deleteLater
();
ui
->
hintLabel
=
NULL
;
}
toolLayout
->
addWidget
(
button
);
button
->
startEditMode
();
...
...
@@ -242,6 +244,7 @@ void QGCToolWidget::addToolWidget(QGCToolWidgetItem* widget)
if
(
ui
->
hintLabel
)
{
ui
->
hintLabel
->
deleteLater
();
ui
->
hintLabel
=
NULL
;
}
toolLayout
->
addWidget
(
widget
);
}
...
...
src/ui/map/MAV2DIcon.cc
View file @
5dcdc1ec
...
...
@@ -191,6 +191,7 @@ void MAV2DIcon::drawIcon(QPen* pen)
case
UASInterface
:
:
QGC_AIRFRAME_EASYSTAR
:
case
UASInterface
:
:
QGC_AIRFRAME_MERLIN
:
case
UASInterface
:
:
QGC_AIRFRAME_TWINSTAR
:
case
UASInterface
:
:
QGC_AIRFRAME_PTERYX
:
{
// DRAW AIRPLANE
...
...
src/ui/uas/UASView.cc
View file @
5dcdc1ec
...
...
@@ -452,7 +452,8 @@ void UASView::selectAirframe()
<<
"Mikrokopter"
<<
"Reaper"
<<
"Predator"
<<
"Coaxial"
;
<<
"Coaxial"
<<
"Pteryx"
;
bool
ok
;
QString
item
=
QInputDialog
::
getItem
(
this
,
tr
(
"Select Airframe for %1"
).
arg
(
uas
->
getUASName
()),
...
...
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