mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 11:23:54 +08:00
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
- pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344
* add pylint to pre-commit and make everything pass
* Remove uncommented stuff
Co-authored-by: J <user@4800.lan>
old-commit-hash: bd06434243
21 lines
371 B
Python
Executable File
21 lines
371 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import time
|
|
from selfdrive.thermald.thermald import setup_eon_fan, set_eon_fan
|
|
|
|
if __name__ == "__main__":
|
|
val = 0
|
|
setup_eon_fan()
|
|
|
|
if len(sys.argv) > 1:
|
|
set_eon_fan(int(sys.argv[1]))
|
|
exit(0)
|
|
|
|
while True:
|
|
sys.stderr.write("setting fan to %d\n" % val)
|
|
set_eon_fan(val)
|
|
time.sleep(2)
|
|
val += 1
|
|
val %= 4
|