revert changes to boardd safety mode setting

pull/21371/head
Willem Melching 2021-06-22 18:44:55 +02:00
parent a8fac002ae
commit 2e3aa81ce5
1 changed files with 20 additions and 0 deletions

View File

@ -49,6 +49,26 @@ void safety_setter_thread() {
Params p = Params();
// switch to SILENT when CarVin param is read
while (true) {
if (do_exit || !panda->connected) {
safety_setter_thread_running = false;
return;
};
std::string value_vin = p.get("CarVin");
if (value_vin.size() > 0) {
// sanity check VIN format
assert(value_vin.size() == 17);
LOGW("got CarVin %s", value_vin.c_str());
break;
}
util::sleep_for(100);
}
// VIN query done, stop listening to OBDII
panda->set_safety_model(cereal::CarParams::SafetyModel::NO_OUTPUT);
std::string params;
LOGW("waiting for params to set safety model");
while (true) {