mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-09 07:32:06 +08:00
safety_setter_thread: exit on ignition low (#22426)
old-commit-hash: 3e854b83517e8239a56b99802ea32d70913563f2
This commit is contained in:
@@ -57,7 +57,7 @@ bool safety_setter_thread(Panda *panda) {
|
||||
|
||||
// switch to SILENT when CarVin param is read
|
||||
while (true) {
|
||||
if (do_exit || !panda->connected) {
|
||||
if (do_exit || !panda->connected || !ignition) {
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ bool safety_setter_thread(Panda *panda) {
|
||||
std::string params;
|
||||
LOGW("waiting for params to set safety model");
|
||||
while (true) {
|
||||
if (do_exit || !panda->connected) {
|
||||
if (do_exit || !panda->connected || !ignition) {
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -309,7 +309,7 @@ bool send_panda_state(PubMaster *pm, Panda *panda, bool spoofing_started) {
|
||||
}
|
||||
}
|
||||
pm->send("pandaState", msg);
|
||||
|
||||
|
||||
return ignition;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user