From 333257badfd2d322464ede273a4a81fb1e74998a Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 2 Apr 2022 07:20:43 +0800 Subject: [PATCH] boardd/safety_setter_thread: use check_all_connected (#24102) --- selfdrive/boardd/boardd.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index dac4730d19..d980f6bbf9 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -140,10 +140,8 @@ bool safety_setter_thread(std::vector pandas) { std::string params; LOGW("waiting for params to set safety model"); while (true) { - for (const auto& panda : pandas) { - if (do_exit || !panda->connected || !ignition) { - return false; - } + if (do_exit || !check_all_connected(pandas) || !ignition) { + return false; } if (p.getBool("ControlsReady")) {