From 4ae96ff8b9bf13537cb0a7eaf286e968061a83e3 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Thu, 7 Nov 2024 10:03:14 -0400 Subject: [PATCH] Fixed bug preventing deleting robots --- guiTools/spiri_sdk_guitools/sim_drone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guiTools/spiri_sdk_guitools/sim_drone.py b/guiTools/spiri_sdk_guitools/sim_drone.py index 6283820..c7dfadb 100644 --- a/guiTools/spiri_sdk_guitools/sim_drone.py +++ b/guiTools/spiri_sdk_guitools/sim_drone.py @@ -105,7 +105,7 @@ class Robot: async def delete_robot(): await self.async_stop() robots.remove(self) - element.remove(robot_ui) + element.remove(self.robot_ui) ui.button("Delete", on_click=delete_robot).classes("m-2") with ui.tabs() as tabs: tab_containers = ui.tab('Containers') @@ -116,6 +116,7 @@ class Robot: async def async_stop(self): return await run.io_bound(self.stop) + def stop(self): #Signal all processes to stop for process in self.processes: