pull/27656/head
Shane Smiskol 3 years ago
parent 03779b6f0d
commit 119a32a17c
  1. 14
      selfdrive/boardd/boardd.cc

@ -115,8 +115,8 @@ bool safety_setter_thread(std::vector<Panda *> pandas) {
// set to ELM327 for fingerprinting
for (int i = 0; i < pandas.size(); i++) {
const uint16_t safety_param = (i > 0) ? 1U : 0U;
pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, safety_param);
// const uint16_t safety_param = (i > 0) ? 1U : 0U;
pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, 0);
}
// openpilot can switch between multiplexing modes for different FW queries,
@ -126,13 +126,15 @@ bool safety_setter_thread(std::vector<Panda *> pandas) {
return false;
}
bool obd_multiplexing_requested = p.getBool("ObdMultiplexingRequested");
if (obd_multiplexing_requested != p.getBool("ObdMultiplexingEnabled")) {
// bool obd_multiplexing_requested = p.getBool("ObdMultiplexingRequested");
std::string obd_multiplexing_requested = p.get("ObdMultiplexingRequested");
if (!obd_multiplexing_requested.empty()) {
const uint16_t safety_param = obd_multiplexing_requested == "1" ? 0U : 1U;
for (int i = 0; i < pandas.size(); i++) {
const uint16_t safety_param = (i > 0) ? (!obd_multiplexing_requested) : 0U;
pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, safety_param);
}
p.putBool("ObdMultiplexingEnabled", obd_multiplexing_requested);
p.remove("ObdMultiplexingRequested", obd_multiplexing_requested);
// p.putBool("ObdMultiplexingEnabled", obd_multiplexing_requested);
}
if (p.getBool("FirmwareQueryDone")) {

Loading…
Cancel
Save