only log startup blocked on conditions changed (#2382)

old-commit-hash: 77d9a68f5d
vw-mqb-aeb
Willem Melching 5 years ago committed by GitHub
parent 1096635586
commit fb8d03d9e1
  1. 4
      selfdrive/thermald/thermald.py

@ -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…
Cancel
Save