|
|
@ -127,8 +127,8 @@ bool safety_setter_thread(std::vector<Panda *> pandas) { |
|
|
|
|
|
|
|
|
|
|
|
bool obd_multiplexing_requested = p.getBool("ObdMultiplexingEnabled"); |
|
|
|
bool obd_multiplexing_requested = p.getBool("ObdMultiplexingEnabled"); |
|
|
|
if (obd_multiplexing_requested != obd_multiplexing_enabled) { |
|
|
|
if (obd_multiplexing_requested != obd_multiplexing_enabled) { |
|
|
|
const uint16_t safety_param = obd_multiplexing_requested ? 0U : 1U; |
|
|
|
|
|
|
|
for (int i = 0; i < pandas.size(); i++) { |
|
|
|
for (int i = 0; i < pandas.size(); i++) { |
|
|
|
|
|
|
|
const uint16_t safety_param = (i > 0 || !obd_multiplexing_requested) ? 1U : 0U; |
|
|
|
pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, safety_param); |
|
|
|
pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, safety_param); |
|
|
|
} |
|
|
|
} |
|
|
|
obd_multiplexing_enabled = obd_multiplexing_requested; |
|
|
|
obd_multiplexing_enabled = obd_multiplexing_requested; |
|
|
|