Skip to content

Commit a038446

Browse files
committed
check if dir exists to avoid errors with timer
1 parent 2c8bc65 commit a038446

File tree

1 file changed

+2
-1
lines changed
  • src/hhd/controller/physical

1 file changed

+2
-1
lines changed

src/hhd/controller/physical/imu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ def open(self):
428428

429429
# Create trigger
430430
try:
431-
os.makedirs("/config/iio/triggers/hrtimer/hhd", exist_ok=True)
431+
if not os.path.isdir("/config/iio/triggers/hrtimer/hhd"):
432+
os.makedirs("/config/iio/triggers/hrtimer/hhd", exist_ok=True)
432433
except Exception as e:
433434
logger.error(
434435
f"Could not create 'hhd' trigger. IMU will not work. Error:\n{e}"

0 commit comments

Comments
 (0)