mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 19:21:35 +08:00
landdetector: delete function update_alt_max
This commit is contained in:
committed by
Lorenz Meier
parent
1774e01c00
commit
3d4e7819a0
@@ -125,7 +125,8 @@ void LandDetector::_cycle()
|
|||||||
_update_state();
|
_update_state();
|
||||||
|
|
||||||
float alt_max_prev = _altitude_max;
|
float alt_max_prev = _altitude_max;
|
||||||
_update_max_altitude();
|
_altitude_max = _get_max_altitude();
|
||||||
|
|
||||||
|
|
||||||
bool freefallDetected = (_state == LandDetectionState::FREEFALL);
|
bool freefallDetected = (_state == LandDetectionState::FREEFALL);
|
||||||
bool landDetected = (_state == LandDetectionState::LANDED);
|
bool landDetected = (_state == LandDetectionState::LANDED);
|
||||||
@@ -221,12 +222,6 @@ void LandDetector::_update_state()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LandDetector::_update_max_altitude()
|
|
||||||
{
|
|
||||||
_altitude_max = _get_max_altitude();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool LandDetector::_orb_update(const struct orb_metadata *meta, int handle, void *buffer)
|
bool LandDetector::_orb_update(const struct orb_metadata *meta, int handle, void *buffer)
|
||||||
{
|
{
|
||||||
bool newData = false;
|
bool newData = false;
|
||||||
|
|||||||
@@ -169,9 +169,6 @@ private:
|
|||||||
|
|
||||||
void _update_state();
|
void _update_state();
|
||||||
|
|
||||||
void _update_max_altitude();
|
|
||||||
|
|
||||||
|
|
||||||
bool _taskShouldExit;
|
bool _taskShouldExit;
|
||||||
bool _taskIsRunning;
|
bool _taskIsRunning;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user