diff options
author | Julian Oes <joes@student.ethz.ch> | 2013-02-17 23:07:07 -0800 |
---|---|---|
committer | Julian Oes <joes@student.ethz.ch> | 2013-02-17 23:07:07 -0800 |
commit | 47b05eeb87191fd0b380de008299f85262bc8953 (patch) | |
tree | d37580e6ed72f1569564882c0bda4d3b8582ba08 /apps/mavlink | |
parent | 3bc385c789f2b39cda066551ff1d5b767ab26aec (diff) | |
download | px4-firmware-47b05eeb87191fd0b380de008299f85262bc8953.tar.gz px4-firmware-47b05eeb87191fd0b380de008299f85262bc8953.tar.bz2 px4-firmware-47b05eeb87191fd0b380de008299f85262bc8953.zip |
Checkpoint, arming/disarming still has a bug
Diffstat (limited to 'apps/mavlink')
-rw-r--r-- | apps/mavlink/mavlink.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/mavlink/mavlink.c b/apps/mavlink/mavlink.c index 4636ee36e..e25f1be27 100644 --- a/apps/mavlink/mavlink.c +++ b/apps/mavlink/mavlink.c @@ -248,26 +248,19 @@ get_mavlink_mode_and_state(uint8_t *mavlink_state, uint8_t *mavlink_mode) *mavlink_state = MAV_STATE_CALIBRATING; - } else if (v_status.flag_system_emergency) { + } else if (v_status.arming_state == ARMING_STATE_ERROR || v_status.arming_state == ARMING_STATE_ABORT) { *mavlink_state = MAV_STATE_EMERGENCY; - } else if (v_status.navigation_state == NAVIGATION_STATE_MANUAL - || v_status.navigation_state == NAVIGATION_STATE_SEATBELT - || v_status.navigation_state == NAVIGATION_STATE_LOITER - || v_status.navigation_state == NAVIGATION_STATE_MISSION - || v_status.navigation_state == NAVIGATION_STATE_RTL - || v_status.navigation_state == NAVIGATION_STATE_LAND - || v_status.navigation_state == NAVIGATION_STATE_TAKEOFF - || v_status.navigation_state == NAVIGATION_STATE_AUTO_READY) { + } else if (v_status.arming_state == ARMING_STATE_ARMED || v_status.arming_state == ARMING_STATE_IN_AIR_RESTORE) { *mavlink_state = MAV_STATE_ACTIVE; - } else if (v_status.navigation_state == NAVIGATION_STATE_STANDBY) { + } else if (v_status.arming_state == ARMING_STATE_STANDBY) { *mavlink_state = MAV_STATE_STANDBY; - } else if (v_status.navigation_state == NAVIGATION_STATE_INIT) { + } else if (v_status.arming_state == ARMING_STATE_INIT) { *mavlink_state = MAV_STATE_UNINIT; } else { |