From c3c78167a35212769ac7246c021af1fb4dfd1093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E7=8E=AE?= Date: Mon, 25 Nov 2024 12:13:49 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=90=AF=E5=8A=A8=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AF=E9=9B=B7=E8=BE=BE=E5=92=8C?= =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E7=94=B5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/detect-gui.iml | 2 +- .idea/misc.xml | 2 +- components/gpio.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.idea/detect-gui.iml b/.idea/detect-gui.iml index a1b377a..80f67ae 100644 --- a/.idea/detect-gui.iml +++ b/.idea/detect-gui.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 9f2e3a2..66b3d02 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/components/gpio.py b/components/gpio.py index ce2d39d..5e1a034 100644 --- a/components/gpio.py +++ b/components/gpio.py @@ -47,12 +47,14 @@ class GPIOManager(EdgeComponent): with open(self.lidar_direction_path, 'w') as f: f.write('out') self.logger.info(f"Export GPIO {self.lidar_pin}") + self.open_lidar() with open(self.export_path, 'w') as f: f.write(str(self.camera_pin)) with open(self.camera_direction_path, 'w') as f: f.write('out') self.logger.info(f"Export GPIO {self.camera_pin}") + self.open_camera() except IOError as e: self.logger.error(f"Error exporting GPIO {self.lidar_pin}/{self.camera_pin}: {e}")