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
29009c4d
Commit
29009c4d
authored
Sep 14, 2010
by
Bryan Godbolt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed output of norm rc values
parent
a7cc2d93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
OpalLink.cc
src/comm/OpalLink.cc
+14
-2
OpalLink.h
src/comm/OpalLink.h
+1
-0
No files found.
src/comm/OpalLink.cc
View file @
29009c4d
...
...
@@ -258,6 +258,15 @@ void OpalLink::getSignals()
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_6
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_7
]),
duty2PulseMicros
(
values
[
OpalRT
::
RAW_CHANNEL_8
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_1
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_2
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_3
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_4
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_5
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_6
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_CHANNEL_7
]),
rescaleNorm
(
values
[
OpalRT
::
NORM_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),
...
...
@@ -265,7 +274,7 @@ void OpalLink::getSignals()
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
),
static_cast<uint8_t>(values[OpalRT::NORM_CHANNEL_8]*255),
*/
0
//rssi unused
);
receiveMessage
(
rc
);
...
...
@@ -323,7 +332,10 @@ uint16_t OpalLink::duty2PulseMicros(double duty)
return
static_cast
<
uint16_t
>
(
duty
/
70
*
1000000
);
}
uint8_t
OpalLink
::
rescaleNorm
(
double
norm
)
{
return
static_cast
<
uint8_t
>
((
norm
+
1
)
/
2
*
255
);
}
bool
OpalLink
::
connect
()
...
...
src/comm/OpalLink.h
View file @
29009c4d
...
...
@@ -153,6 +153,7 @@ protected:
unsigned
short
opalInstID
;
uint16_t
duty2PulseMicros
(
double
duty
);
uint8_t
rescaleNorm
(
double
norm
);
};
#endif // OPALLINK_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