From 55c3a89421d5a80d77b61553264e545ab9df48d0 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Wed, 3 Jun 2020 19:28:41 -0700 Subject: [PATCH] slow down upload check when offroad (#1634) old-commit-hash: f4e8df7ee6de2998968bfa93f09f2359ca21b89e --- selfdrive/loggerd/uploader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/loggerd/uploader.py b/selfdrive/loggerd/uploader.py index b479574b02..5b14bba8a8 100644 --- a/selfdrive/loggerd/uploader.py +++ b/selfdrive/loggerd/uploader.py @@ -256,8 +256,9 @@ def uploader_fn(exit_event): return d = uploader.next_file_to_upload(with_raw=allow_raw_upload and should_upload) - if d is None: - time.sleep(5) + if d is None: # Nothing to upload + offroad = params.get("IsOffroad") == b'1' + time.sleep(60 if offroad else 5) continue key, fn = d