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
da2aaa92
Commit
da2aaa92
authored
Feb 06, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed windows visual studio compile warnings.
parent
27618df8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
18 deletions
+22
-18
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+4
-4
MAVLinkSimulationWaypointPlanner.cc
src/comm/MAVLinkSimulationWaypointPlanner.cc
+1
-1
SlugsMAV.cc
src/uas/SlugsMAV.cc
+4
-4
HUD.cc
src/ui/HUD.cc
+5
-5
RadioCalibrationData.h
src/ui/RadioCalibration/RadioCalibrationData.h
+5
-1
MAV2DIcon.cc
src/ui/map/MAV2DIcon.cc
+3
-3
No files found.
src/comm/MAVLinkSimulationLink.cc
View file @
da2aaa92
...
@@ -182,10 +182,10 @@ void MAVLinkSimulationLink::mainloop()
...
@@ -182,10 +182,10 @@ void MAVLinkSimulationLink::mainloop()
// Fake system values
// Fake system values
static
float
fullVoltage
=
4.2
*
3
;
static
float
fullVoltage
=
4.2
f
*
3.0
f
;
static
float
emptyVoltage
=
3.35
*
3
;
static
float
emptyVoltage
=
3.35
f
*
3.0
f
;
static
float
voltage
=
fullVoltage
;
static
float
voltage
=
fullVoltage
;
static
float
drainRate
=
0.025
;
// x.xx% of the capacity is linearly drained per second
static
float
drainRate
=
0.025
f
;
// x.xx% of the capacity is linearly drained per second
mavlink_attitude_t
attitude
;
mavlink_attitude_t
attitude
;
memset
(
&
attitude
,
0
,
sizeof
(
mavlink_attitude_t
));
memset
(
&
attitude
,
0
,
sizeof
(
mavlink_attitude_t
));
...
@@ -212,7 +212,7 @@ void MAVLinkSimulationLink::mainloop()
...
@@ -212,7 +212,7 @@ void MAVLinkSimulationLink::mainloop()
// VOLTAGE
// VOLTAGE
// The battery is drained constantly
// The battery is drained constantly
voltage
=
voltage
-
((
fullVoltage
-
emptyVoltage
)
*
drainRate
/
rate
);
voltage
=
voltage
-
((
fullVoltage
-
emptyVoltage
)
*
drainRate
/
rate
);
if
(
voltage
<
3.550
*
3
)
voltage
=
3.550
*
3
;
if
(
voltage
<
3.550
f
*
3.0
f
)
voltage
=
3.550
f
*
3.0
f
;
static
int
state
=
0
;
static
int
state
=
0
;
...
...
src/comm/MAVLinkSimulationWaypointPlanner.cc
View file @
da2aaa92
...
@@ -584,7 +584,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
...
@@ -584,7 +584,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
// FIXME big hack for simulation!
// FIXME big hack for simulation!
//float oneDegreeOfLatMeters = 111131.745f;
//float oneDegreeOfLatMeters = 111131.745f;
float
orbit
=
0.00008
;
float
orbit
=
0.00008
f
;
// compare current position (given in message) with current waypoint
// compare current position (given in message) with current waypoint
//float orbit = wp->param1;
//float orbit = wp->param1;
...
...
src/uas/SlugsMAV.cc
View file @
da2aaa92
...
@@ -64,11 +64,12 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -64,11 +64,12 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
if
(
message
.
sysid
==
uasId
)
if
(
message
.
sysid
==
uasId
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
// Handle your special messages mavlink_message_t* msg = &message;
// Handle your special messages mavlink_message_t* msg = &message;
switch
(
message
.
msgid
)
switch
(
message
.
msgid
)
{
{
#ifdef MAVLINK_ENABLED_SLUGS
case
MAVLINK_MSG_ID_RAW_IMU
:
case
MAVLINK_MSG_ID_RAW_IMU
:
mavlink_msg_raw_imu_decode
(
&
message
,
&
mlRawImuData
);
mavlink_msg_raw_imu_decode
(
&
message
,
&
mlRawImuData
);
...
@@ -151,12 +152,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -151,12 +152,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
break
;
break
;
#endif
default:
default:
// qDebug() << "\nSLUGS RECEIVED MESSAGE WITH ID" << message.msgid;
// qDebug() << "\nSLUGS RECEIVED MESSAGE WITH ID" << message.msgid;
break
;
break
;
}
}
#endif
}
}
}
}
...
...
src/ui/HUD.cc
View file @
da2aaa92
...
@@ -338,7 +338,7 @@ void HUD::updateBattery(UASInterface* uas, double voltage, double percent, int s
...
@@ -338,7 +338,7 @@ void HUD::updateBattery(UASInterface* uas, double voltage, double percent, int s
// this->timeRemaining = seconds;
// this->timeRemaining = seconds;
// this->percentRemaining = percent;
// this->percentRemaining = percent;
fuelStatus
.
sprintf
(
"BAT [%02.0f
\%
% | %05.2fV] (%02dm:%02ds)"
,
percent
,
voltage
,
seconds
/
60
,
seconds
%
60
);
fuelStatus
.
sprintf
(
"BAT [%02.0f % | %05.2fV] (%02dm:%02ds)"
,
percent
,
voltage
,
seconds
/
60
,
seconds
%
60
);
if
(
percent
<
20.0
f
)
if
(
percent
<
20.0
f
)
{
{
...
@@ -647,10 +647,10 @@ void HUD::paintHUD()
...
@@ -647,10 +647,10 @@ void HUD::paintHUD()
yawInt
+=
newYawDiff
;
yawInt
+=
newYawDiff
;
if
(
yawInt
>
M_PI
)
yawInt
=
M_PI
;
if
(
yawInt
>
M_PI
)
yawInt
=
(
float
)
M_PI
;
if
(
yawInt
<
-
M_PI
)
yawInt
=
-
M_PI
;
if
(
yawInt
<
-
M_PI
)
yawInt
=
(
float
)
-
M_PI
;
float
yawTrans
=
yawInt
*
(
double
)
maxYawTrans
;
float
yawTrans
=
yawInt
*
(
float
)
maxYawTrans
;
yawInt
*=
0.6
f
;
yawInt
*=
0.6
f
;
if
((
yawTrans
<
5.0
)
&&
(
yawTrans
>
-
5.0
))
yawTrans
=
0
;
if
((
yawTrans
<
5.0
)
&&
(
yawTrans
>
-
5.0
))
yawTrans
=
0
;
...
@@ -836,7 +836,7 @@ void HUD::paintHUD()
...
@@ -836,7 +836,7 @@ void HUD::paintHUD()
// Rotate view and draw all roll-dependent indicators
// Rotate view and draw all roll-dependent indicators
painter
.
rotate
((
rollLP
/
M_PI
)
*
-
180.0
f
);
painter
.
rotate
((
rollLP
/
M_PI
)
*
-
180.0
f
);
painter
.
translate
(
0
,
(
-
pitchLP
/
M_PI
)
*
-
180.0
f
*
refToScreenY
(
1.8
));
painter
.
translate
(
0
,
(
-
pitchLP
/
(
float
)
M_PI
)
*
-
180.0
f
*
refToScreenY
(
1.8
f
));
//qDebug() << "ROLL" << roll << "PITCH" << pitch << "YAW DIFF" << valuesDot.value("roll", 0.0f);
//qDebug() << "ROLL" << roll << "PITCH" << pitch << "YAW DIFF" << valuesDot.value("roll", 0.0f);
...
...
src/ui/RadioCalibration/RadioCalibrationData.h
View file @
da2aaa92
...
@@ -67,7 +67,11 @@ public:
...
@@ -67,7 +67,11 @@ public:
};
};
const
float
*
operator
[](
int
i
)
const
;
const
float
*
operator
[](
int
i
)
const
;
#ifdef _MSC_VER
const
QVector
<
float
>&
operator
()(
int
i
)
const
;
#else
const
QVector
<
float
>&
operator
()(
int
i
)
const
throw
(
std
::
out_of_range
);
const
QVector
<
float
>&
operator
()(
int
i
)
const
throw
(
std
::
out_of_range
);
#endif
void
set
(
int
element
,
int
index
,
float
value
)
{(
*
data
)[
element
][
index
]
=
value
;}
void
set
(
int
element
,
int
index
,
float
value
)
{(
*
data
)[
element
][
index
]
=
value
;}
public
slots
:
public
slots
:
...
...
src/ui/map/MAV2DIcon.cc
View file @
da2aaa92
...
@@ -57,12 +57,12 @@ void MAV2DIcon::setYaw(float yaw)
...
@@ -57,12 +57,12 @@ void MAV2DIcon::setYaw(float yaw)
{
{
//qDebug() << "MAV2Icon" << yaw;
//qDebug() << "MAV2Icon" << yaw;
float
diff
=
fabs
(
yaw
-
this
->
yaw
);
float
diff
=
fabs
(
yaw
-
this
->
yaw
);
while
(
diff
>
M_PI
)
while
(
diff
>
(
float
)
M_PI
)
{
{
diff
-=
M_PI
;
diff
-=
(
float
)
M_PI
;
}
}
if
(
diff
>
0.1
)
if
(
diff
>
0.1
f
)
{
{
this
->
yaw
=
yaw
;
this
->
yaw
=
yaw
;
drawIcon
(
mypen
);
drawIcon
(
mypen
);
...
...
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