From b586e93fe598743e9724909dcd9ee60363ac78b4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 9 May 2024 19:39:07 -0500 Subject: [PATCH] wip --- selfdrive/thermald/thermald.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index b129a0a..6922234 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -434,24 +434,24 @@ def thermald_thread(end_event, hw_queue) -> None: statlog.gauge("fan_speed_percent_desired", msg.deviceState.fanSpeedPercentDesired) statlog.gauge("screen_brightness_percent", msg.deviceState.screenBrightnessPercent) - # report to server once every 10 minutes - rising_edge_started = should_start and not should_start_prev - if rising_edge_started or (count % int(600. / DT_TRML)) == 0: - dat = { - 'count': count, - 'pandaStates': [strip_deprecated_keys(p.to_dict()) for p in pandaStates], - 'peripheralState': strip_deprecated_keys(peripheralState.to_dict()), - 'location': (strip_deprecated_keys(sm["gpsLocationExternal"].to_dict()) if sm.alive["gpsLocationExternal"] else None), - 'deviceState': strip_deprecated_keys(msg.to_dict()) - } - cloudlog.event("STATUS_PACKET", **dat) + # # report to server once every 10 minutes + # rising_edge_started = should_start and not should_start_prev + # if rising_edge_started or (count % int(600. / DT_TRML)) == 0: + # dat = { + # 'count': count, + # 'pandaStates': [strip_deprecated_keys(p.to_dict()) for p in pandaStates], + # 'peripheralState': strip_deprecated_keys(peripheralState.to_dict()), + # 'location': (strip_deprecated_keys(sm["gpsLocationExternal"].to_dict()) if sm.alive["gpsLocationExternal"] else None), + # 'deviceState': strip_deprecated_keys(msg.to_dict()) + # } + # cloudlog.event("STATUS_PACKET", **dat) - # save last one before going onroad - if rising_edge_started: - try: - params.put("LastOffroadStatusPacket", json.dumps(dat)) - except Exception: - cloudlog.exception("failed to save offroad status") + # # save last one before going onroad + # if rising_edge_started: + # try: + # params.put("LastOffroadStatusPacket", json.dumps(dat)) + # except Exception: + # cloudlog.exception("failed to save offroad status") params.put_bool_nonblocking("NetworkMetered", msg.deviceState.networkMetered)