From 24495a2278cd52a74d071b8ae7e571ba3563dece Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 18 Apr 2020 06:52:40 +0800 Subject: [PATCH] close sensors when it's done (#1367) --- selfdrive/sensord/sensors.cc | 2 +- selfdrive/ui/ui.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/sensord/sensors.cc b/selfdrive/sensord/sensors.cc index 952a4863c2..5e8741dbb3 100644 --- a/selfdrive/sensord/sensors.cc +++ b/selfdrive/sensord/sensors.cc @@ -225,7 +225,7 @@ void sensor_loop() { break; } } - + sensors_close(device); delete sensor_events_sock; delete c; } diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index a5a12de689..f175d7092d 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -911,7 +911,7 @@ static void* light_sensor_thread(void *args) { s->light_sensor = buffer[0].light; } } - + sensors_close(device); return NULL; fail: