boardd/safety_setter_thread: use check_all_connected (#24102)

This commit is contained in:
Dean Lee
2022-04-02 07:20:43 +08:00
committed by GitHub
parent 3fc4f8dfcf
commit 333257badf
+2 -4
View File
@@ -140,10 +140,8 @@ bool safety_setter_thread(std::vector<Panda *> pandas) {
std::string params; std::string params;
LOGW("waiting for params to set safety model"); LOGW("waiting for params to set safety model");
while (true) { while (true) {
for (const auto& panda : pandas) { if (do_exit || !check_all_connected(pandas) || !ignition) {
if (do_exit || !panda->connected || !ignition) { return false;
return false;
}
} }
if (p.getBool("ControlsReady")) { if (p.getBool("ControlsReady")) {