mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
allow running amp config script standalone (#27587)
Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 2749205b4a8d87b18051d3fa8c680b2e9a849a33
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