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
1b38fb03
Commit
1b38fb03
authored
Sep 21, 2010
by
Bryan Godbolt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
got uas to cast properly. in radio calibrator
parent
b2f67f06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
11 deletions
+30
-11
qgroundcontrol.pro
qgroundcontrol.pro
+1
-1
UAS.cc
src/uas/UAS.cc
+1
-1
RadioCalibrationWindow.cc
src/ui/RadioCalibration/RadioCalibrationWindow.cc
+26
-8
RadioCalibrationWindow.h
src/ui/RadioCalibration/RadioCalibrationWindow.h
+2
-1
No files found.
qgroundcontrol.pro
View file @
1b38fb03
...
...
@@ -19,7 +19,7 @@ BASEDIR = .
BUILDDIR
=
build
LANGUAGE
=
C
++
CONFIG
+=
debug_and_release
\
console
#
console
OBJECTS_DIR
=
$$
BUILDDIR
/
obj
MOC_DIR
=
$$
BUILDDIR
/
moc
UI_HEADERS_DIR
=
src
/
ui
/
generated
...
...
src/uas/UAS.cc
View file @
1b38fb03
...
...
@@ -1156,7 +1156,7 @@ void UAS::receiveButton(int buttonIndex)
break
;
}
qDebug
()
<<
__FILE__
<<
__LINE__
<<
": Received button clicked signal (button # is: "
<<
buttonIndex
<<
"), UNIMPLEMENTED IN MAVLINK!"
;
//
qDebug() << __FILE__ << __LINE__ << ": Received button clicked signal (button # is: " << buttonIndex << "), UNIMPLEMENTED IN MAVLINK!";
}
...
...
src/ui/RadioCalibration/RadioCalibrationWindow.cc
View file @
1b38fb03
#include "RadioCalibrationWindow.h"
RadioCalibrationWindow
::
RadioCalibrationWindow
(
QWidget
*
parent
)
:
QWidget
(
parent
,
Qt
::
Window
)
QWidget
(
parent
,
Qt
::
Window
),
radio
(
new
RadioCalibrationData
())
{
QGridLayout
*
grid
=
new
QGridLayout
();
...
...
@@ -26,7 +27,23 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) :
/* Buttons for loading/transmitting calibration data */
QHBoxLayout
*
hbox
=
new
QHBoxLayout
();
QPushButton
*
load
=
new
QPushButton
(
tr
(
"Load File"
));
QPushButton
*
save
=
new
QPushButton
(
tr
(
"Save File"
));
QPushButton
*
transmit
=
new
QPushButton
(
tr
(
"Transmit to UAV"
));
QPushButton
*
get
=
new
QPushButton
(
tr
(
"Get from UAV"
));
hbox
->
addWidget
(
load
);
hbox
->
addWidget
(
save
);
hbox
->
addWidget
(
transmit
);
hbox
->
addWidget
(
get
);
grid
->
addLayout
(
hbox
,
2
,
0
,
1
,
4
);
this
->
setLayout
(
grid
);
connect
(
load
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
loadFile
()));
connect
(
save
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
saveFile
()));
connect
(
transmit
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
send
()));
connect
(
get
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
receive
()));
setUASId
(
0
);
}
void
RadioCalibrationWindow
::
setChannel
(
int
ch
,
float
raw
,
float
normalized
)
...
...
@@ -96,18 +113,19 @@ RadioCalibrationWindow::RadioCalibrationData::RadioCalibrationData(RadioCalibrat
void
RadioCalibrationWindow
::
RadioCalibrationData
::
saveFile
()
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"SAVE TO FILE"
;
}
void
RadioCalibrationWindow
::
RadioCalibrationData
::
loadFile
()
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"LOAD FROM FILE"
;
}
void
RadioCalibrationWindow
::
RadioCalibrationData
::
send
()
{
#ifdef MAVLINK_ENABLE_UALBERTA_MESSAGES
UAS
*
uas
=
dynamic_cast
<
UAS
>
(
UASManager
::
instance
()
->
getUASForId
(
uasId
));
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"uasId = "
<<
uasId
;
#ifdef MAVLINK_ENABLED_UALBERTA_MESSAGES
UAS
*
uas
=
dynamic_cast
<
UAS
*>
(
UASManager
::
instance
()
->
getUASForId
(
uasId
));
if
(
uas
)
{
qDebug
()
<<
"we have a uas"
;
...
...
@@ -119,7 +137,7 @@ void RadioCalibrationWindow::RadioCalibrationData::send()
(
*
data
)[
GYRO
].
constData
(),
(
*
data
)[
PITCH
].
constData
(),
(
*
data
)[
THROTTLE
].
constData
());
uas
.
sendMessage
(
msg
);
uas
->
sendMessage
(
msg
);
}
#endif
...
...
@@ -127,10 +145,10 @@ void RadioCalibrationWindow::RadioCalibrationData::send()
void
RadioCalibrationWindow
::
RadioCalibrationData
::
receive
()
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"READ FROM UAV"
;
}
void
RadioCalibrationWindow
::
RadioCalibrationData
::
setUASId
(
int
id
)
{
this
->
uasI
D
=
id
;
this
->
uasI
d
=
id
;
}
src/ui/RadioCalibration/RadioCalibrationWindow.h
View file @
1b38fb03
...
...
@@ -16,6 +16,7 @@
#include "UASManager.h"
#include "UASInterface.h"
#include "UAS.h"
#include "mavlink.h"
class
RadioCalibrationWindow
:
public
QWidget
...
...
@@ -75,7 +76,7 @@ protected:
protected:
QVector
<
QVector
<
float
>
>
*
data
;
int
uasI
D
;
int
uasI
d
;
void
init
(
const
QVector
<
float
>&
aileron
,
const
QVector
<
float
>&
elevator
,
...
...
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