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
614151ce
Commit
614151ce
authored
Jul 15, 2011
by
Bryan Godbolt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
radio calibraion working
parent
9481145a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
27 deletions
+27
-27
QGCRemoteControlView.cc
src/ui/QGCRemoteControlView.cc
+20
-20
QGCRemoteControlView.h
src/ui/QGCRemoteControlView.h
+1
-1
RadioCalibrationWindow.cc
src/ui/RadioCalibration/RadioCalibrationWindow.cc
+6
-6
No files found.
src/ui/QGCRemoteControlView.cc
View file @
614151ce
...
...
@@ -120,25 +120,25 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
redraw
();
}
//
void QGCRemoteControlView::setChannelScaled(int channelId, float normalized)
//
{
//
if (this->raw.size() <= channelId) // using raw vector as size indicator
//
{
//
// This is a new channel, append it
//
this->normalized.append(normalized);
//
this->raw.append(0);
//
appendChannelWidget(channelId);
//
}
//
else
//
{
//
// This is an existing channel, update it
//
this->normalized[channelId] = normalized;
//
}
//
updated = true;
void
QGCRemoteControlView
::
setChannelScaled
(
int
channelId
,
float
normalized
)
{
if
(
this
->
raw
.
size
()
<=
channelId
)
// using raw vector as size indicator
{
// This is a new channel, append it
this
->
normalized
.
append
(
normalized
);
this
->
raw
.
append
(
0
);
appendChannelWidget
(
channelId
);
}
else
{
// This is an existing channel, update it
this
->
normalized
[
channelId
]
=
normalized
;
}
updated
=
true
;
//
// FIXME Will be timer based in the future
//
redraw();
//
}
// FIXME Will be timer based in the future
redraw
();
}
void
QGCRemoteControlView
::
setRemoteRSSI
(
float
rssiNormalized
)
{
...
...
@@ -179,9 +179,9 @@ void QGCRemoteControlView::redraw()
// Update percent bars
for
(
int
i
=
0
;
i
<
progressBars
.
count
();
i
++
)
{
rawLabels
.
at
(
i
)
->
setText
(
QString
(
"%1 us"
).
arg
(
raw
.
at
(
i
),
4
,
10
,
QChar
(
'0'
)));
//
int vv = normalized.at(i)*100.0f;
int
vv
=
normalized
.
at
(
i
)
*
100.0
f
;
//progressBars.at(i)->setValue(vv);
int
vv
=
raw
.
at
(
i
)
*
1.0
f
;
//
int vv = raw.at(i)*1.0f;
progressBars
.
at
(
i
)
->
setValue
(
vv
);
}
// Update RSSI
...
...
src/ui/QGCRemoteControlView.h
View file @
614151ce
...
...
@@ -55,7 +55,7 @@ public:
public
slots
:
void
setUASId
(
int
id
);
void
setChannelRaw
(
int
channelId
,
float
raw
);
//
void setChannelScaled(int channelId, float normalized);
void
setChannelScaled
(
int
channelId
,
float
normalized
);
void
setRemoteRSSI
(
float
rssiNormalized
);
void
redraw
();
...
...
src/ui/RadioCalibration/RadioCalibrationWindow.cc
View file @
614151ce
...
...
@@ -43,12 +43,12 @@ RadioCalibrationWindow::RadioCalibrationWindow(QWidget *parent) :
connect
(
transmit
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
send
()));
connect
(
get
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
request
()));
connect
(
aileron
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setAileron
(
int
,
floa
t
)));
connect
(
elevator
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setElevator
(
int
,
floa
t
)));
connect
(
rudder
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setRudder
(
int
,
floa
t
)));
connect
(
gyro
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setGyro
(
int
,
floa
t
)));
connect
(
pitch
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setPitch
(
int
,
floa
t
)));
connect
(
throttle
,
SIGNAL
(
setpointChanged
(
int
,
float
)),
radio
,
SLOT
(
setThrottle
(
int
,
floa
t
)));
connect
(
aileron
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setAileron
(
int
,
uint16_
t
)));
connect
(
elevator
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setElevator
(
int
,
uint16_
t
)));
connect
(
rudder
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setRudder
(
int
,
uint16_
t
)));
connect
(
gyro
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setGyro
(
int
,
uint16_
t
)));
connect
(
pitch
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setPitch
(
int
,
uint16_
t
)));
connect
(
throttle
,
SIGNAL
(
setpointChanged
(
int
,
uint16_t
)),
radio
,
SLOT
(
setThrottle
(
int
,
uint16_
t
)));
setUASId
(
0
);
}
...
...
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