Skip to content

Commit

Permalink
fix: gui images
Browse files Browse the repository at this point in the history
image path for GUI is wrong
  • Loading branch information
JarbasAl committed Nov 16, 2024
1 parent d936d82 commit 8c22589
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ def __init__(self, *args, **kwargs):
self.settings["center_location"] = False
if "iss_size" not in self.settings:
self.settings["iss_size"] = 0.5
if "iss_icon" not in self.settings:
self.settings["iss_icon"] = f"{self.root_dir}/ui/iss3.png"
if "iss_bg" not in self.settings:
self.settings["iss_bg"] = f"{self.root_dir}/ui/iss.png"
if "dpi" not in self.settings:
self.settings["dpi"] = 500

Expand Down Expand Up @@ -128,7 +124,7 @@ def generate_map(self, lat, lon):
m.bluemarble()
x, y = m(lon, lat)

iss = plt.imread(self.settings["iss_icon"])
iss = plt.imread(self.settings.get("iss_icon", f"{self.root_dir}/ui/iss3.png"))
im = OffsetImage(iss, zoom=self.settings["iss_size"])
ab = AnnotationBbox(im, (x, y), xycoords='data', frameon=False)

Expand All @@ -145,7 +141,7 @@ def generate_map(self, lat, lon):
@intent_handler("about.intent")
def handle_about_iss_intent(self, message):
utterance = self.dialog_renderer.render("about", {})
self.gui.show_image(self.settings["iss_bg"],
self.gui.show_image(self.settings.get("iss_bg", "iss.png"),
override_idle=True,
fill='PreserveAspectFit',
caption=utterance)
Expand Down

0 comments on commit 8c22589

Please sign in to comment.