Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use return INFINITY for FixedwingLandDetector::_get_max_altitude(). #12343

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/modules/land_detector/FixedwingLandDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ void FixedwingLandDetector::_update_topics()
_airspeed_sub.update(&_airspeed);
}

float FixedwingLandDetector::_get_max_altitude()
{
// TODO: This means no altitude limit as the limit
// is always current position plus 10000 meters.
return roundf(-_vehicle_local_position.z + 10000);
}

bool FixedwingLandDetector::_get_landed_state()
{
// Only trigger flight conditions if we are armed.
Expand Down
4 changes: 0 additions & 4 deletions src/modules/land_detector/FixedwingLandDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#pragma once

#include <matrix/math.hpp>
#include <uORB/Subscription.hpp>
#include <uORB/topics/airspeed.h>

#include "LandDetector.h"
Expand All @@ -61,9 +60,6 @@ class FixedwingLandDetector final : public LandDetector
protected:

bool _get_landed_state() override;

float _get_max_altitude() override;

void _update_topics() override;

private:
Expand Down
1 change: 0 additions & 1 deletion src/modules/land_detector/LandDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#include <uORB/topics/vehicle_land_detected.h>
#include <uORB/topics/vehicle_local_position.h>


using namespace time_literals;

namespace land_detector
Expand Down
5 changes: 0 additions & 5 deletions src/modules/land_detector/MulticopterLandDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,11 @@

#pragma once

#include <math.h>

#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/parameter_update.h>
#include <uORB/topics/vehicle_acceleration.h>
#include <uORB/topics/vehicle_angular_velocity.h>
#include <uORB/topics/vehicle_attitude.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>

#include "LandDetector.h"
Expand Down
1 change: 0 additions & 1 deletion src/modules/land_detector/VtolLandDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

#pragma once

#include <uORB/Subscription.hpp>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/vehicle_status.h>

Expand Down