rate limit offroad mem logging

old-commit-hash: 8fb26b95e9
This commit is contained in:
Adeeb Shihadeh 2021-04-28 00:09:03 -07:00
parent 86a1616de9
commit 9aa9d33f92
1 changed files with 3 additions and 3 deletions

View File

@ -244,9 +244,6 @@ def thermald_thread():
msg.deviceState.batteryVoltage = HARDWARE.get_battery_voltage() msg.deviceState.batteryVoltage = HARDWARE.get_battery_voltage()
msg.deviceState.usbOnline = HARDWARE.get_usb_present() 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 # Fake battery levels on uno for frame
if (not EON) or is_uno: if (not EON) or is_uno:
msg.deviceState.batteryPercent = 100 msg.deviceState.batteryPercent = 100
@ -408,6 +405,9 @@ def thermald_thread():
# report to server once every 10 minutes # report to server once every 10 minutes
if (count % int(600. / DT_TRML)) == 0: 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) location = messaging.recv_sock(location_sock)
cloudlog.event("STATUS_PACKET", cloudlog.event("STATUS_PACKET",
count=count, count=count,