From c6336d41f32551bb70e6fee650ec8ca8ded46251 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sun, 15 Jun 2014 17:03:29 +0900 Subject: [PATCH] att_hist: return current attitude instead of None on failure --- scripts/attitude_history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/attitude_history.py b/scripts/attitude_history.py index 2b85ce0..e06d8d9 100644 --- a/scripts/attitude_history.py +++ b/scripts/attitude_history.py @@ -55,9 +55,9 @@ def update(self): # get_attitude - get attitude at given time def get_attitude(self, desired_time_in_sec): - # return immediately if dictionary is empty + # return current attitude immediately if dictionary is empty if len(self.att_dict) == 0: - return None + return self.vehicle.attitude # get times from dict keys = sorted(self.att_dict.keys())