mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-10 20:33:12 +08:00
allow running amp config script standalone (#27587)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2749205b4a
This commit is contained in:
Regular → Executable
+9
@@ -129,3 +129,12 @@ class Amplifier:
|
||||
self.set_config(config)
|
||||
|
||||
self.set_global_shutdown(amp_disabled=False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open("/sys/firmware/devicetree/base/model") as f:
|
||||
model = f.read().strip('\x00')
|
||||
model = model.split('comma ')[-1]
|
||||
|
||||
amp = Amplifier()
|
||||
amp.initialize_configuration(model)
|
||||
|
||||
Reference in New Issue
Block a user