mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 07:33:33 +08:00
LandDetector: switch land flags to properies instead of one state
This commit is contained in:
committed by
Daniel Agar
parent
1e1549a169
commit
679e4fedf5
@@ -104,29 +104,8 @@ int LandDetector::task_spawn(int argc, char *argv[])
|
||||
int LandDetector::print_status()
|
||||
{
|
||||
PX4_INFO("running (%s)", _currentMode);
|
||||
LandDetector::LandDetectionState state = get_state();
|
||||
|
||||
switch (state) {
|
||||
case LandDetector::LandDetectionState::FLYING:
|
||||
PX4_INFO("State: Flying");
|
||||
break;
|
||||
|
||||
case LandDetector::LandDetectionState::LANDED:
|
||||
PX4_INFO("State: Landed");
|
||||
break;
|
||||
|
||||
case LandDetector::LandDetectionState::FREEFALL:
|
||||
PX4_INFO("State: Freefall");
|
||||
break;
|
||||
|
||||
default:
|
||||
PX4_ERR("State: unknown");
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LandDetector::print_usage(const char *reason)
|
||||
{
|
||||
if (reason != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user