|
|
@ -3961,7 +3961,7 @@ class AutoTestCopter(AutoTest): |
|
|
|
|
|
|
|
|
|
|
|
if not (m.type_mask == (target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE) or m.type_mask == target_typemask): |
|
|
|
if not (m.type_mask == (target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE) or m.type_mask == target_typemask): |
|
|
|
raise NotAchievedException("Did not receive proper mask: expected=%u or %u, got=%u" % |
|
|
|
raise NotAchievedException("Did not receive proper mask: expected=%u or %u, got=%u" % |
|
|
|
((target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE), target_typemask, m.type_mask)) |
|
|
|
((target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE), target_typemask, m.type_mask)) |
|
|
|
|
|
|
|
|
|
|
|
if x - m.x > 0.1: |
|
|
|
if x - m.x > 0.1: |
|
|
|
raise NotAchievedException("Did not receive proper target position x: wanted=%f got=%f" % (x, m.x)) |
|
|
|
raise NotAchievedException("Did not receive proper target position x: wanted=%f got=%f" % (x, m.x)) |
|
|
@ -4012,7 +4012,7 @@ class AutoTestCopter(AutoTest): |
|
|
|
# Check the last received message |
|
|
|
# Check the last received message |
|
|
|
if not (m.type_mask == (target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE) or m.type_mask == target_typemask): |
|
|
|
if not (m.type_mask == (target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE) or m.type_mask == target_typemask): |
|
|
|
raise NotAchievedException("Did not receive proper mask: expected=%u or %u, got=%u" % |
|
|
|
raise NotAchievedException("Did not receive proper mask: expected=%u or %u, got=%u" % |
|
|
|
((target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE), target_typemask, m.type_mask)) |
|
|
|
((target_typemask | MAV_POS_TARGET_TYPE_MASK.LAST_BYTE), target_typemask, m.type_mask)) |
|
|
|
|
|
|
|
|
|
|
|
if vx - m.vx > 0.1: |
|
|
|
if vx - m.vx > 0.1: |
|
|
|
raise NotAchievedException("Did not receive proper target velocity vx: wanted=%f got=%f" % (vx, m.vx)) |
|
|
|
raise NotAchievedException("Did not receive proper target velocity vx: wanted=%f got=%f" % (vx, m.vx)) |
|
|
|