mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
land_detector: cleanup subscriptions & publications
This commit is contained in:
@@ -60,6 +60,18 @@ LandDetector::LandDetector() :
|
||||
LandDetector::~LandDetector()
|
||||
{
|
||||
perf_free(_cycle_perf);
|
||||
|
||||
if (_armingSub >= 0) {
|
||||
orb_unsubscribe(_armingSub);
|
||||
}
|
||||
|
||||
if (_parameterSub >= 0) {
|
||||
orb_unsubscribe(_parameterSub);
|
||||
}
|
||||
|
||||
if (_landDetectedPub) {
|
||||
orb_unadvertise(_landDetectedPub);
|
||||
}
|
||||
}
|
||||
|
||||
int LandDetector::start()
|
||||
|
||||
Reference in New Issue
Block a user