mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fix(twai): make sure that can bus is shut down properly
This commit is contained in:
@@ -421,6 +421,7 @@ class CanBusManager:
|
|||||||
if self.bus:
|
if self.bus:
|
||||||
try:
|
try:
|
||||||
self.bus.shutdown()
|
self.bus.shutdown()
|
||||||
|
subprocess.run(['sudo', '-n', 'ip', 'link', 'set', self.interface, 'down'], check=True)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user