mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 20:42:09 +08:00
Fix dashcam missing CarState
old-commit-hash: 0112a8d3fda01d2e12b00b340014e974851773d6
This commit is contained in:
@@ -27,12 +27,17 @@ def load_interfaces(brand_names):
|
||||
for brand_name in brand_names:
|
||||
path = ('selfdrive.car.%s' % brand_name)
|
||||
CarInterface = __import__(path + '.interface', fromlist=['CarInterface']).CarInterface
|
||||
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carcontroller.py'):
|
||||
CarController = __import__(path + '.carcontroller', fromlist=['CarController']).CarController
|
||||
|
||||
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carstate.py'):
|
||||
CarState = __import__(path + '.carstate', fromlist=['CarState']).CarState
|
||||
else:
|
||||
CarController = None
|
||||
CarState = None
|
||||
|
||||
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carcontroller.py'):
|
||||
CarController = __import__(path + '.carcontroller', fromlist=['CarController']).CarController
|
||||
else:
|
||||
CarController = None
|
||||
|
||||
for model_name in brand_names[brand_name]:
|
||||
ret[model_name] = (CarInterface, CarController, CarState)
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user