From 4455e5769389aa18ea396a3981cf3a3b989c6271 Mon Sep 17 00:00:00 2001 From: Chris Pham Date: Thu, 8 Feb 2018 13:57:49 -0800 Subject: [PATCH] fixed wrong size references --- ground_station/resources/core/RoverMap.py | 2 +- ground_station/resources/core/RoverMapCoordinator.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ground_station/resources/core/RoverMap.py b/ground_station/resources/core/RoverMap.py index a3c2dcd..e1c8671 100644 --- a/ground_station/resources/core/RoverMap.py +++ b/ground_station/resources/core/RoverMap.py @@ -243,7 +243,7 @@ class GMapsStitcher(object): new_value = self.upper_y - diff if !(new_value > 0 and - new_value < self.big_image.size[0] - self.height): + new_value < self.big_image.size[1] - self.height): return self.upper_y else: return new_value diff --git a/ground_station/resources/core/RoverMapCoordinator.py b/ground_station/resources/core/RoverMapCoordinator.py index b03c9d0..b266752 100644 --- a/ground_station/resources/core/RoverMapCoordinator.py +++ b/ground_station/resources/core/RoverMapCoordinator.py @@ -23,7 +23,8 @@ class RoverMapCoordinator(QtCore.QThread): super(RoverMapCoordinator, self).init() self.shared_objects = shared_objects - self.right_screen = self.shared_objects["screens"]["left_screen"] + self.left_screen = self.shared_objects["screens"]["left_screen"] + self.mapping_label = self.left_screen.mapping_label self.setings = QtCore.QSettings() @@ -48,8 +49,12 @@ class RoverMapCoordinator(QtCore.QThread): self.map_thread.wait() def _setup_map_threads(self): - self.map_thread = RoverMap.GMapsStitcher(2000, - 2000, 44.567161, -123.278432, + self.map_thread = RoverMap.GMapsStitcher(1280, + 720, 44.567161, -123.278432, 18, 'terrain', None, 20) + def pixmap_ready_slot(self): + self.mapping_label.setPixmap(self.map_thread.display_image) + def on_kill_threads_requested_slot(self): + self.run_thread_flag = false \ No newline at end of file