|
|
@ -180,6 +180,7 @@ def thermald_thread(): |
|
|
|
startup_conditions = { |
|
|
|
startup_conditions = { |
|
|
|
"ignition": False, |
|
|
|
"ignition": False, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
startup_conditions_prev = startup_conditions.copy() |
|
|
|
|
|
|
|
|
|
|
|
off_ts = None |
|
|
|
off_ts = None |
|
|
|
started_ts = None |
|
|
|
started_ts = None |
|
|
@ -376,7 +377,7 @@ def thermald_thread(): |
|
|
|
started_seen = True |
|
|
|
started_seen = True |
|
|
|
os.system('echo performance > /sys/class/devfreq/soc:qcom,cpubw/governor') |
|
|
|
os.system('echo performance > /sys/class/devfreq/soc:qcom,cpubw/governor') |
|
|
|
else: |
|
|
|
else: |
|
|
|
if startup_conditions["ignition"]: |
|
|
|
if startup_conditions["ignition"] and (startup_conditions != startup_conditions_prev): |
|
|
|
cloudlog.event("Startup blocked", startup_conditions=startup_conditions) |
|
|
|
cloudlog.event("Startup blocked", startup_conditions=startup_conditions) |
|
|
|
if should_start_prev or (count == 0): |
|
|
|
if should_start_prev or (count == 0): |
|
|
|
params.put("IsOffroad", "1") |
|
|
|
params.put("IsOffroad", "1") |
|
|
@ -411,6 +412,7 @@ def thermald_thread(): |
|
|
|
set_offroad_alert_if_changed("Offroad_ChargeDisabled", (not usb_power)) |
|
|
|
set_offroad_alert_if_changed("Offroad_ChargeDisabled", (not usb_power)) |
|
|
|
|
|
|
|
|
|
|
|
should_start_prev = should_start |
|
|
|
should_start_prev = should_start |
|
|
|
|
|
|
|
startup_conditions_prev = startup_conditions.copy() |
|
|
|
|
|
|
|
|
|
|
|
# report to server once per minute |
|
|
|
# report to server once per minute |
|
|
|
if (count % int(60. / DT_TRML)) == 0: |
|
|
|
if (count % int(60. / DT_TRML)) == 0: |
|
|
|