UI add SpeedFromPCM
This commit is contained in:
parent
aacaef9a2c
commit
c981eb3057
@ -2751,8 +2751,30 @@ public:
|
|||||||
strcpy(bottom, str.toStdString().c_str());
|
strcpy(bottom, str.toStdString().c_str());
|
||||||
|
|
||||||
// bottom_left
|
// 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"));
|
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
|
// bottom_right
|
||||||
Params params_memory = Params("/dev/shm/params");
|
Params params_memory = Params("/dev/shm/params");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user