UI add SpeedFromPCM

This commit is contained in:
机械小鸽 2025-03-01 22:11:48 +08:00 committed by GitHub
parent aacaef9a2c
commit c981eb3057
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2751,8 +2751,30 @@ public:
strcpy(bottom, str.toStdString().c_str());
// bottom_left
// CSLC (Custom Speed Limit Control): 自定义速度限制控制
// MRCC (Mazda Radar Cruise Control): 马自达雷达巡航控制
// OPCS (OpenPilot Control System): OpenPilot 控制系统
// FCM: 其他车型的速度模式显示
QString gitBranch = QString::fromStdString(params.get("GitBranch"));
sprintf(bottom_left, "%s", gitBranch.toStdString().c_str());
int speedFromPCM = params.getInt("SpeedFromPCM");
switch (speedFromPCM) {
case 0:
sprintf(bottom_left, "%s - CSLC", gitBranch.toStdString().c_str());
break;
case 1:
sprintf(bottom_left, "%s - MRCC", gitBranch.toStdString().c_str());
break;
case 2:
sprintf(bottom_left, "%s - OPCS", gitBranch.toStdString().c_str());
break;
default:
sprintf(bottom_left, "%s", gitBranch.toStdString().c_str());
break;
}
// bottom_right
Params params_memory = Params("/dev/shm/params");