diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-20 16:24:29 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-20 16:24:29 +0200 |
commit | ec49c72a8b82c57dcbc572c7bfdbd7807d609153 (patch) | |
tree | 1c81453a6430559c4e854acf9184f47ddf81747c /src/modules/commander | |
parent | c6c41bfae63ccf94dc6b4fe3e87485526b1b2752 (diff) | |
parent | db950f74893a108302a167729a91765269981e7b (diff) | |
download | px4-firmware-ec49c72a8b82c57dcbc572c7bfdbd7807d609153.tar.gz px4-firmware-ec49c72a8b82c57dcbc572c7bfdbd7807d609153.tar.bz2 px4-firmware-ec49c72a8b82c57dcbc572c7bfdbd7807d609153.zip |
Merge branch 'seatbelt_multirotor_new' of github.com:PX4/Firmware into fmuv2_bringup_new_state_machine_drton
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index d6818ee79..17db0f9c8 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -788,6 +788,17 @@ int commander_thread_main(int argc, char *argv[]) /* update condition_local_position_valid and condition_local_altitude_valid */ check_valid(local_position.timestamp, POSITION_TIMEOUT, local_position.xy_valid, &(status.condition_local_position_valid), &status_changed); check_valid(local_position.timestamp, POSITION_TIMEOUT, local_position.z_valid, &(status.condition_local_altitude_valid), &status_changed); + if (status.condition_local_altitude_valid) { + if (status.condition_landed != local_position.landed) { + status.condition_landed = local_position.landed; + status_changed = true; + if (status.condition_landed) { + mavlink_log_info(mavlink_fd, "[cmd] LANDED"); + } else { + mavlink_log_info(mavlink_fd, "[cmd] IN AIR"); + } + } + } /* update battery status */ orb_check(battery_sub, &updated); |