FIX:fixed a single has incorrect AMS filamet road

jira:[none]

Change-Id: I26cdf08ddb5586cb1511d6aa1c42e7fd308c58f3
(cherry picked from commit a43ad7db0e1986757b3440a15682aaa906e34a8e)
This commit is contained in:
tao wang 2024-12-30 17:48:48 +08:00 committed by Noisyfox
parent ac7127f63f
commit 0030861915

View file

@ -1624,12 +1624,22 @@ void AMSControl::SetAmsStep(std::string ams_id, std::string canid, AMSPassRoadTy
if (model == AMSModel::AMS_LITE){
length = left ? 145 : 45;
}
if (model == EXT_AMS && ams->get_ext_type() == AMSModelOriginType::LITE_EXT){
length = 145;
if (model == EXT_AMS && ams->get_ext_type() == AMSModelOriginType::LITE_EXT) {
if (m_ams_info.size() == 0 && m_ext_info.size() == 1) {
length = 13;
} else {
length = 145;
}
}
if (model == EXT_AMS && ams->get_ext_type() == AMSModelOriginType::GENERIC_EXT){
length = left ? 110 : 82;
if (model == EXT_AMS && ams->get_ext_type() == AMSModelOriginType::GENERIC_EXT) {
if (m_ams_info.size() == 0 && m_ext_info.size() == 1) {
left = true;
length = 49;
} else {
length = left ? 110 : 82;
}
}
for (auto i = 0; i < m_ams_info.size(); i++) {