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
12025fd3
Commit
12025fd3
authored
Jan 05, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HIL shutdown crash
parent
ff6edbdc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
21 deletions
+18
-21
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+1
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+1
-1
UAS.cc
src/uas/UAS.cc
+14
-17
UAS.h
src/uas/UAS.h
+2
-2
No files found.
src/Vehicle/MultiVehicleManager.cc
View file @
12025fd3
...
@@ -109,7 +109,7 @@ void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle)
...
@@ -109,7 +109,7 @@ void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle)
}
}
vehicle
->
setActive
(
false
);
vehicle
->
setActive
(
false
);
vehicle
->
uas
()
->
clear
Vehicle
();
vehicle
->
uas
()
->
shutdown
Vehicle
();
// First we must signal that a vehicle is no longer available.
// First we must signal that a vehicle is no longer available.
_activeVehicleAvailable
=
false
;
_activeVehicleAvailable
=
false
;
...
...
src/Vehicle/Vehicle.cc
View file @
12025fd3
...
@@ -1057,7 +1057,7 @@ void Vehicle::setFlightMode(const QString& flightMode)
...
@@ -1057,7 +1057,7 @@ void Vehicle::setFlightMode(const QString& flightMode)
mavlink_msg_set_mode_pack
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
id
(),
newBaseMode
,
custom_mode
);
mavlink_msg_set_mode_pack
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
id
(),
newBaseMode
,
custom_mode
);
sendMessage
(
msg
);
sendMessage
(
msg
);
}
else
{
}
else
{
q
CWarning
(
VehicleLog
)
<<
"FirmwarePlugin::setFlightMode failed, flightMode:"
<<
flightMode
;
q
Warning
(
)
<<
"FirmwarePlugin::setFlightMode failed, flightMode:"
<<
flightMode
;
}
}
}
}
...
...
src/uas/UAS.cc
View file @
12025fd3
...
@@ -193,23 +193,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
...
@@ -193,23 +193,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
statusTimeout
.
start
(
500
);
statusTimeout
.
start
(
500
);
}
}
/**
* Saves the settings of name, airframe, autopilot type and battery specifications
* by calling writeSettings.
*/
UAS
::~
UAS
()
{
#ifndef __mobile__
stopHil
();
if
(
simulation
)
{
// wait for the simulator to exit
simulation
->
wait
();
simulation
->
disconnectSimulation
();
simulation
->
deleteLater
();
}
#endif
}
/**
/**
* @ return the id of the uas
* @ return the id of the uas
*/
*/
...
@@ -2216,3 +2199,17 @@ void UAS::_say(const QString& text, int severity)
...
@@ -2216,3 +2199,17 @@ void UAS::_say(const QString& text, int severity)
if
(
!
qgcApp
()
->
runningUnitTests
())
if
(
!
qgcApp
()
->
runningUnitTests
())
qgcApp
()
->
toolbox
()
->
audioOutput
()
->
say
(
text
,
severity
);
qgcApp
()
->
toolbox
()
->
audioOutput
()
->
say
(
text
,
severity
);
}
}
void
UAS
::
shutdownVehicle
(
void
)
{
#ifndef __mobile__
stopHil
();
if
(
simulation
)
{
// wait for the simulator to exit
simulation
->
wait
();
simulation
->
disconnectSimulation
();
simulation
->
deleteLater
();
}
#endif
_vehicle
=
NULL
;
}
src/uas/UAS.h
View file @
12025fd3
...
@@ -64,7 +64,6 @@ class UAS : public UASInterface
...
@@ -64,7 +64,6 @@ class UAS : public UASInterface
Q_OBJECT
Q_OBJECT
public:
public:
UAS
(
MAVLinkProtocol
*
protocol
,
Vehicle
*
vehicle
,
FirmwarePluginManager
*
firmwarePluginManager
);
UAS
(
MAVLinkProtocol
*
protocol
,
Vehicle
*
vehicle
,
FirmwarePluginManager
*
firmwarePluginManager
);
~
UAS
();
float
lipoFull
;
///< 100% charged voltage
float
lipoFull
;
///< 100% charged voltage
float
lipoEmpty
;
///< Discharged voltage
float
lipoEmpty
;
///< Discharged voltage
...
@@ -100,7 +99,8 @@ public:
...
@@ -100,7 +99,8 @@ public:
Q_PROPERTY
(
double
satRawVDOP
READ
getSatRawVDOP
NOTIFY
satRawVDOPChanged
)
Q_PROPERTY
(
double
satRawVDOP
READ
getSatRawVDOP
NOTIFY
satRawVDOPChanged
)
Q_PROPERTY
(
double
satRawCOG
READ
getSatRawCOG
NOTIFY
satRawCOGChanged
)
Q_PROPERTY
(
double
satRawCOG
READ
getSatRawCOG
NOTIFY
satRawCOGChanged
)
void
clearVehicle
(
void
)
{
_vehicle
=
NULL
;
}
/// Vehicle is about to go away
void
shutdownVehicle
(
void
);
void
setGroundSpeed
(
double
val
)
void
setGroundSpeed
(
double
val
)
{
{
...
...
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