From cbd237a58a0cebad01ea25258b10cba0e41b9378 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 25 Dec 2016 21:13:30 +0100 Subject: [PATCH] Integration test: Robustify against 0 home altitude --- integrationtests/python_src/px4_it/mavros/mission_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integrationtests/python_src/px4_it/mavros/mission_test.py b/integrationtests/python_src/px4_it/mavros/mission_test.py index 1c15596583..8d5ef8e38c 100755 --- a/integrationtests/python_src/px4_it/mavros/mission_test.py +++ b/integrationtests/python_src/px4_it/mavros/mission_test.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 #*************************************************************************** # -# Copyright (c) 2015 PX4 Development Team. All rights reserved. +# Copyright (c) 2015-2016 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -107,8 +107,9 @@ class MavrosMissionTest(unittest.TestCase): self.global_position = data if not self.has_global_pos: - self.home_alt = data.altitude - self.has_global_pos = True + if data.altitude != 0: + self.home_alt = data.altitude + self.has_global_pos = True def extended_state_callback(self, data):