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