From 13959f67922c0120bddb44f7942f5cf6e29a27da Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 31 Jan 2023 01:10:39 -0800 Subject: [PATCH] fixes --- selfdrive/boardd/boardd.cc | 6 +++--- selfdrive/thermald/thermald.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 83871f6d6f..cf62f12796 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -463,15 +463,15 @@ void panda_state_thread(PubMaster *pm, std::vector pandas, bool spoofin LOGD("start panda state thread"); int i = 0; - int on_t = 15; - int off_t = 5; + int on_t = 12; + int off_t = 4; // run at 2hz while (!do_exit && check_all_connected(pandas)) { i += 1; uint64_t start_time = nanos_since_boot(); - bool _spoofing_started = i % ((on_t + off_t) * 2) >= off_t * 2 + bool _spoofing_started = i % ((on_t + off_t) * 2) >= off_t * 2; // send out peripheralState send_peripheral_state(pm, peripheral_panda); diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index eedeff31f1..31d832fa92 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -278,7 +278,7 @@ def thermald_thread(end_event, hw_queue): startup_conditions["up_to_date"] = params.get("Offroad_ConnectivityNeeded") is None or params.get_bool("DisableUpdates") or params.get_bool("SnoozeUpdate") startup_conditions["not_uninstalling"] = not params.get_bool("DoUninstall") startup_conditions["accepted_terms"] = params.get("HasAcceptedTerms") == terms_version - startup_conditions["offroad_min_time"] = (not started_seen) or ((off_ts is not None) and (sec_since_boot() - off_ts) > 5.) + startup_conditions["offroad_min_time"] = True # (not started_seen) or ((off_ts is not None) and (sec_since_boot() - off_ts) > 5.) # with 2% left, we killall, otherwise the phone will take a long time to boot startup_conditions["free_space"] = msg.deviceState.freeSpacePercent > 2