From 9aa9d33f92268de9d96c0dfb36e25d11d3588381 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 28 Apr 2021 00:09:03 -0700 Subject: [PATCH] rate limit offroad mem logging old-commit-hash: 8fb26b95e92620d3d3c6e5e94d6f7a97b35bbad7 --- selfdrive/thermald/thermald.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index eb83aaf2e3..43e6962a39 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -244,9 +244,6 @@ def thermald_thread(): msg.deviceState.batteryVoltage = HARDWARE.get_battery_voltage() msg.deviceState.usbOnline = HARDWARE.get_usb_present() - if EON and started_ts is None and msg.deviceState.memoryUsagePercent > 40: - cloudlog.event("High offroad memory usage", mem=msg.deviceState.memoryUsagePercent) - # Fake battery levels on uno for frame if (not EON) or is_uno: msg.deviceState.batteryPercent = 100 @@ -408,6 +405,9 @@ def thermald_thread(): # report to server once every 10 minutes if (count % int(600. / DT_TRML)) == 0: + if EON and started_ts is None and msg.deviceState.memoryUsagePercent > 40: + cloudlog.event("High offroad memory usage", mem=msg.deviceState.memoryUsagePercent) + location = messaging.recv_sock(location_sock) cloudlog.event("STATUS_PACKET", count=count,