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
c37b4af7
Commit
c37b4af7
authored
Jul 16, 2011
by
lm
Browse files
Options
Browse Files
Download
Plain Diff
Merged, removed MAVLink generator from main codebase, still present as included external app
parents
f338b5ef
0f28dcbf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
655 deletions
+7
-655
QGCRemoteControlView.cc
src/ui/QGCRemoteControlView.cc
+5
-3
RadioCalibrationWindow.cc
src/ui/RadioCalibration/RadioCalibrationWindow.cc
+2
-63
RadioCalibrationWindow.h
src/ui/RadioCalibration/RadioCalibrationWindow.h
+0
-3
QGCMAVLinkTextEdit.cc
src/ui/mavlink/QGCMAVLinkTextEdit.cc
+0
-480
QGCMAVLinkTextEdit.h
src/ui/mavlink/QGCMAVLinkTextEdit.h
+0
-106
No files found.
src/ui/QGCRemoteControlView.cc
View file @
c37b4af7
...
...
@@ -80,9 +80,8 @@ void QGCRemoteControlView::setUASId(int id)
// The UAS exists, disconnect any existing connections
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
,
float
)),
this
,
SLOT
(
setChannel
(
int
,
float
,
float
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlRSSIChanged
(
float
)),
this
,
SLOT
(
setRemoteRSSI
(
float
)));
disconnect
(
uas
,
SIGNAL
(
radioCalibrationRawReceived
(
const
QPointer
<
RadioCalibrationData
>
)),
calibrationWindow
,
SLOT
(
receive
(
const
QPointer
<
RadioCalibrationData
>&
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
calibrationWindow
,
SLOT
(
setChannelRaw
(
int
,
float
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelScaledChanged
(
int
,
float
,
float
)),
calibrationWindow
,
SLOT
(
setChannelScaled
(
int
,
float
)));
disconnect
(
uas
,
SIGNAL
(
radioCalibrationRawReceived
(
const
QPointer
<
RadioCalibrationData
>&
)),
calibrationWindow
,
SLOT
(
receive
(
const
QPointer
<
RadioCalibrationData
>&
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
calibrationWindow
,
SLOT
(
setChannel
(
int
,
float
)));
}
}
...
...
@@ -97,6 +96,9 @@ void QGCRemoteControlView::setUASId(int id)
connect
(
newUAS
,
SIGNAL
(
remoteControlRSSIChanged
(
float
)),
this
,
SLOT
(
setRemoteRSSI
(
float
)));
connect
(
newUAS
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
this
,
SLOT
(
setChannelRaw
(
int
,
float
)));
connect
(
newUAS
,
SIGNAL
(
remoteControlChannelScaledChanged
(
int
,
float
)),
this
,
SLOT
(
setChannelScaled
(
int
,
float
)));
// only connect raw channels to calibration window widget
connect
(
newUAS
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
calibrationWindow
,
SLOT
(
setChannel
(
int
,
float
)));
}
}
...
...
src/ui/RadioCalibration/RadioCalibrationWindow.cc
View file @
c37b4af7
...
...
@@ -52,68 +52,7 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) :
setUASId
(
0
);
}
//void RadioCalibrationWindow::setChannelRaw(int ch, float raw)
//{
// /** this expects a particular channel to function mapping
// \todo allow run-time channel mapping
// */
// switch (ch)
// {
// case 0:
// aileron->channelChanged(raw);
// break;
// case 1:
// elevator->channelChanged(raw);
// break;
// case 2:
// throttle->channelChanged(raw);
// break;
// case 3:
// rudder->channelChanged(raw);
// break;
// case 4:
// gyro->channelChanged(raw);
// break;
// case 5:
// pitch->channelChanged(raw);
// break;
// }
//}
//void RadioCalibrationWindow::setChannelScaled(int ch, float normalized)
//{
// FIXME James
// FIXME Bryan
// /** this expects a particular channel to function mapping
// \todo allow run-time channel mapping
// */
// switch (ch)
// {
// case 0:
// aileron->channelChanged(raw);
// break;
// case 1:
// elevator->channelChanged(raw);
// break;
// case 2:
// throttle->channelChanged(raw);
// break;
// case 3:
// rudder->channelChanged(raw);
// break;
// case 4:
// gyro->channelChanged(raw);
// break;
// case 5:
// pitch->channelChanged(raw);
// break;
// }
//}
void
RadioCalibrationWindow
::
setChannel
(
int
ch
,
float
raw
)
{
...
...
@@ -313,7 +252,7 @@ void RadioCalibrationWindow::parseSetpoint(const QDomElement &setpoint, const QP
void
RadioCalibrationWindow
::
send
()
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"uasId = "
<<
uasId
;
#ifdef MAVLINK_ENABLED_UALBERTA
_MESSAGES
#ifdef MAVLINK_ENABLED_UALBERTA
UAS
*
uas
=
dynamic_cast
<
UAS
*>
(
UASManager
::
instance
()
->
getUASForId
(
uasId
));
if
(
uas
)
{
mavlink_message_t
msg
;
...
...
src/ui/RadioCalibration/RadioCalibrationWindow.h
View file @
c37b4af7
...
...
@@ -67,9 +67,6 @@ public:
public
slots
:
void
setChannel
(
int
ch
,
float
raw
);
// @todo remove these functions if they are not needed - were added by lm on dec 14, 2010
// void setChannelRaw(int ch, float raw);
// void setChannelScaled(int ch, float normalized);
void
loadFile
();
void
saveFile
();
void
send
();
...
...
src/ui/mavlink/QGCMAVLinkTextEdit.cc
deleted
100644 → 0
View file @
f338b5ef
This diff is collapsed.
Click to expand it.
src/ui/mavlink/QGCMAVLinkTextEdit.h
deleted
100644 → 0
View file @
f338b5ef
// Based on: Syntax highlighting from:
// http://code.google.com/p/fop-miniscribus/
// (GPL v2) thanks!
#ifndef QGCMAVLINKTEXTEDIT_H
#define QGCMAVLINKTEXTEDIT_H
#include <QSyntaxHighlighter>
#include <QTextCharFormat>
#include <QColor>
#include <QDomDocument>
#include <QTextEdit>
//class QGCMAVLinkTextEdit : public QTextEdit
//{
//public:
// QGCMAVLinkTextEdit();
//};
class
XmlHighlighter
:
public
QSyntaxHighlighter
{
public:
XmlHighlighter
(
QObject
*
parent
);
XmlHighlighter
(
QTextDocument
*
parent
);
XmlHighlighter
(
QTextEdit
*
parent
);
~
XmlHighlighter
();
enum
HighlightType
{
SyntaxChar
,
ElementName
,
Comment
,
AttributeName
,
AttributeValue
,
Error
,
Other
};
void
setHighlightColor
(
HighlightType
type
,
QColor
color
,
bool
foreground
=
true
);
void
setHighlightFormat
(
HighlightType
type
,
QTextCharFormat
format
);
protected:
void
highlightBlock
(
const
QString
&
rstrText
);
int
processDefaultText
(
int
i
,
const
QString
&
rstrText
);
private:
void
init
();
QTextCharFormat
fmtSyntaxChar
;
QTextCharFormat
fmtElementName
;
QTextCharFormat
fmtComment
;
QTextCharFormat
fmtAttributeName
;
QTextCharFormat
fmtAttributeValue
;
QTextCharFormat
fmtError
;
QTextCharFormat
fmtOther
;
enum
ParsingState
{
NoState
=
0
,
ExpectElementNameOrSlash
,
ExpectElementName
,
ExpectAttributeOrEndOfElement
,
ExpectEqual
,
ExpectAttributeValue
};
enum
BlockState
{
NoBlock
=
-
1
,
InComment
,
InElement
};
ParsingState
state
;
};
class
QGCMAVLinkTextEdit
:
public
QTextEdit
{
Q_OBJECT
//
public:
QGCMAVLinkTextEdit
(
QWidget
*
parent
=
0
);
bool
Conform
();
QDomDocument
xml_document
();
inline
QString
text
()
const
{
return
QTextEdit
::
toPlainText
();
}
QMenu
*
createOwnStandardContextMenu
();
protected:
void
contextMenuEvent
(
QContextMenuEvent
*
e
);
bool
event
(
QEvent
*
event
);
private:
XmlHighlighter
*
highlight
;
signals:
public
slots
:
bool
syntaxcheck
();
void
setPlainText
(
const
QString
txt
);
};
#endif // QGCMAVLINKTEXTEDIT_H
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