|
|
|
@ -301,6 +301,10 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *> |
|
|
|
|
std::vector<std::array<can_health_t, PANDA_CAN_CNT>> pandaCanStates; |
|
|
|
|
pandaCanStates.reserve(pandas_cnt); |
|
|
|
|
|
|
|
|
|
const bool red_panda_comma_three = (pandas.size() == 2) && |
|
|
|
|
(pandas[0]->hw_type == cereal::PandaState::PandaType::DOS) && |
|
|
|
|
(pandas[1]->hw_type == cereal::PandaState::PandaType::RED_PANDA); |
|
|
|
|
|
|
|
|
|
for (const auto& panda : pandas){ |
|
|
|
|
auto health_opt = panda->get_state(); |
|
|
|
|
if (!health_opt) { |
|
|
|
@ -323,6 +327,13 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *> |
|
|
|
|
health.ignition_line_pkt = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// on comma three setups with a red panda, the dos can
|
|
|
|
|
// get false positive ignitions due to the harness box
|
|
|
|
|
// without a harness connector, so ignore it
|
|
|
|
|
if (red_panda_comma_three && (panda->hw_type == cereal::PandaState::PandaType::DOS)) { |
|
|
|
|
health.ignition_line_pkt = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ignition_local |= ((health.ignition_line_pkt != 0) || (health.ignition_can_pkt != 0)); |
|
|
|
|
|
|
|
|
|
pandaStates.push_back(health); |
|
|
|
|