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
aa35c64a
Commit
aa35c64a
authored
Sep 14, 2010
by
Bryan Godbolt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'radio'
parents
520823e1
6bd067bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
2 deletions
+59
-2
OpalLink.cc
src/comm/OpalLink.cc
+29
-0
OpalLink.h
src/comm/OpalLink.h
+2
-0
OpalRT.h
src/comm/OpalRT.h
+20
-2
MainWindow.cc
src/ui/MainWindow.cc
+7
-0
QGCRemoteControlView.cc
src/ui/QGCRemoteControlView.cc
+1
-0
No files found.
src/comm/OpalLink.cc
View file @
aa35c64a
...
...
@@ -246,6 +246,29 @@ void OpalLink::getSignals()
values
[
OpalRT
::
B_W_2
]
);
receiveMessage
(
bias
);
/* send radio outputs */
mavlink_message_t
rc
;
mavlink_msg_rc_channels_pack
(
systemID
,
componentID
,
&
rc
,
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_1
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_2
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_3
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_4
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_5
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_6
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_7
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_8
]),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_1
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_2
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_3
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_4
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_5
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_6
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_7
]
*
255
),
static_cast
<
uint8_t
>
(
values
[
OpalRT
::
NORM_CHANNEL_8
]
*
255
),
0
//rssi unused
);
receiveMessage
(
rc
);
}
else
if
(
returnVal
!=
EAGAIN
)
// if returnVal == EAGAIN => data just wasn't ready
{
...
...
@@ -294,6 +317,12 @@ bool OpalLink::isConnected() {
return
connectState
;
}
uint16_t
OpalLink
::
duty2PulseMicros
(
double
duty
)
{
/* duty cycle assumed to be of a signal at 70 Hz */
return
static_cast
<
uint16_t
>
(
duty
/
70
*
1000000
);
}
...
...
src/comm/OpalLink.h
View file @
aa35c64a
...
...
@@ -151,6 +151,8 @@ protected:
OpalRT
::
ParameterList
*
params
;
unsigned
short
opalInstID
;
uint16_t
duty2PulseMicros
(
double
duty
);
};
#endif // OPALLINK_H
src/comm/OpalRT.h
View file @
aa35c64a
...
...
@@ -41,7 +41,7 @@ namespace OpalRT
Configuration info for the model
*/
const
unsigned
short
NUM_OUTPUT_SIGNALS
=
39
;
const
unsigned
short
NUM_OUTPUT_SIGNALS
=
57
;
/* ------------------------------ Outputs ------------------------------
*
...
...
@@ -85,7 +85,25 @@ namespace OpalRT
B_F_2
,
B_W_0
,
B_W_1
,
B_W_2
B_W_2
,
RAW_CHANNEL_1
=
39
,
RAW_CHANNEL_2
,
RAW_CHANNEL_3
,
RAW_CHANNEL_4
,
RAW_CHANNEL_5
,
RAW_CHANNEL_6
,
RAW_CHANNEL_7
,
RAW_CHANNEL_8
,
NORM_CHANNEL_1
,
NORM_CHANNEL_2
,
NORM_CHANNEL_3
,
NORM_CHANNEL_4
,
NORM_CHANNEL_5
,
NORM_CHANNEL_6
,
NORM_CHANNEL_7
,
NORM_CHANNEL_8
,
CONTROLLER_AILERON
,
CONTROLLER_ELEVATOR
};
/** Component IDs of the parameters. Currently they are all 1 becuase there is no advantage
...
...
src/ui/MainWindow.cc
View file @
aa35c64a
...
...
@@ -979,6 +979,13 @@ void MainWindow::loadEngineerView()
parametersDockWidget
->
show
();
}
// RADIO CONTROL VIEW
if
(
rcViewDockWidget
)
{
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
rcViewDockWidget
);
rcViewDockWidget
->
show
();
}
this
->
show
();
}
...
...
src/ui/QGCRemoteControlView.cc
View file @
aa35c64a
...
...
@@ -45,6 +45,7 @@ QGCRemoteControlView::QGCRemoteControlView(QWidget *parent) :
channelLayout
(
new
QVBoxLayout
()),
ui
(
new
Ui
::
QGCRemoteControlView
)
{
//ui->setupUi(this);
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
layout
->
addLayout
(
channelLayout
,
1
,
0
,
1
,
2
);
...
...
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