Compare commits

...

1 Commits

Author SHA1 Message Date
Adeeb Shihadeh 25b1d52314 thermald: non-blocking power save configuration 2022-03-21 19:01:40 -07:00
1 changed files with 4 additions and 1 deletions

View File

@ -305,7 +305,10 @@ def thermald_thread(end_event, hw_queue):
params.put_bool("IsEngaged", False)
engaged_prev = False
HARDWARE.set_power_save(not should_start)
# this can take more than a second
t = threading.Thread(target=HARDWARE.set_power_save, args=(not should_start, ))
t.start()
if sm.updated['controlsState']:
engaged = sm['controlsState'].enabled