LandDetector: switch land flags to properies instead of one state

This commit is contained in:
Matthias Grob
2019-10-16 00:47:01 -04:00
committed by Daniel Agar
parent 1e1549a169
commit 679e4fedf5
5 changed files with 20 additions and 71 deletions
@@ -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) {