feat: add AS status feedback for both HMI sizes with verified v2.7 release
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
draw 0,0,799,479,10565
|
||||
line 180,30,180,456,10565
|
||||
line 524,30,524,456,10565
|
||||
line 210,96,484,96,2047
|
||||
shown_task=-1
|
||||
shown_lock=-1
|
||||
shown_ebs=-1
|
||||
shown_as=-1
|
||||
if(current_task!=shown_task)
|
||||
{
|
||||
rw.txt="未知"
|
||||
rw.pco=33840
|
||||
if(current_task==0)
|
||||
{
|
||||
rw.txt="无"
|
||||
rw.pco=63488
|
||||
}
|
||||
if(current_task>=1&¤t_task<=6)
|
||||
{
|
||||
rw.pco=2016
|
||||
}
|
||||
if(current_task==1)
|
||||
{
|
||||
rw.txt="八字绕环"
|
||||
}
|
||||
if(current_task==2)
|
||||
{
|
||||
rw.txt="直线加速"
|
||||
}
|
||||
if(current_task==3)
|
||||
{
|
||||
rw.txt="高速循迹"
|
||||
}
|
||||
if(current_task==4)
|
||||
{
|
||||
rw.txt="车检测试"
|
||||
}
|
||||
if(current_task==5)
|
||||
{
|
||||
rw.txt="EBS测试"
|
||||
}
|
||||
if(current_task==6)
|
||||
{
|
||||
rw.txt="手动驾驶"
|
||||
}
|
||||
bt0.val=0
|
||||
if(current_task==1)
|
||||
{
|
||||
bt0.val=1
|
||||
}
|
||||
bt1.val=0
|
||||
if(current_task==2)
|
||||
{
|
||||
bt1.val=1
|
||||
}
|
||||
bt2.val=0
|
||||
if(current_task==3)
|
||||
{
|
||||
bt2.val=1
|
||||
}
|
||||
bt3.val=0
|
||||
if(current_task==4)
|
||||
{
|
||||
bt3.val=1
|
||||
}
|
||||
bt4.val=0
|
||||
if(current_task==5)
|
||||
{
|
||||
bt4.val=1
|
||||
}
|
||||
bt5.val=0
|
||||
if(current_task==6)
|
||||
{
|
||||
bt5.val=1
|
||||
}
|
||||
shown_task=current_task
|
||||
}
|
||||
if(lock_state!=shown_lock)
|
||||
{
|
||||
sd.txt="锁定未知"
|
||||
sd.pco=33840
|
||||
if(lock_state==1)
|
||||
{
|
||||
sd.txt="已锁定"
|
||||
sd.pco=2016
|
||||
}
|
||||
if(lock_state==2)
|
||||
{
|
||||
sd.txt="已解锁"
|
||||
sd.pco=63488
|
||||
}
|
||||
shown_lock=lock_state
|
||||
}
|
||||
if(ebs_state!=shown_ebs)
|
||||
{
|
||||
EBS.txt="EBS 未知"
|
||||
EBS.pco=33840
|
||||
EBS.bco=0
|
||||
if(ebs_state==1)
|
||||
{
|
||||
EBS.txt="EBS 正常"
|
||||
EBS.pco=65535
|
||||
EBS.bco=2016
|
||||
}
|
||||
if(ebs_state==2)
|
||||
{
|
||||
EBS.txt="EBS 故障"
|
||||
EBS.pco=65535
|
||||
EBS.bco=63488
|
||||
}
|
||||
shown_ebs=ebs_state
|
||||
}
|
||||
|
||||
if(as_state!=shown_as)
|
||||
{
|
||||
xstr 330,379,174,53,4,33840,0,1,1,1,"无人未知"
|
||||
if(as_state==0)
|
||||
{
|
||||
xstr 330,379,174,53,4,65535,0,1,1,1,"AS OFF"
|
||||
}
|
||||
if(as_state==1)
|
||||
{
|
||||
xstr 330,379,174,53,4,65504,0,1,1,1,"AS Ready"
|
||||
}
|
||||
if(as_state==2)
|
||||
{
|
||||
xstr 330,379,174,53,4,65504,0,1,1,1,"AS Driving"
|
||||
}
|
||||
if(as_state==3)
|
||||
{
|
||||
xstr 330,379,174,53,4,31,0,1,1,1,"AS Finished"
|
||||
}
|
||||
if(as_state==4)
|
||||
{
|
||||
xstr 330,379,174,53,4,63488,0,1,1,1,"AS Emergency"
|
||||
}
|
||||
if(as_state==5)
|
||||
{
|
||||
xstr 330,379,174,53,4,2016,0,1,1,1,"Manual Driving"
|
||||
}
|
||||
shown_as=as_state
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
if(current_task!=shown_task)
|
||||
{
|
||||
rw.txt="未知"
|
||||
rw.pco=33840
|
||||
if(current_task==0)
|
||||
{
|
||||
rw.txt="无"
|
||||
rw.pco=63488
|
||||
}
|
||||
if(current_task>=1&¤t_task<=6)
|
||||
{
|
||||
rw.pco=2016
|
||||
}
|
||||
if(current_task==1)
|
||||
{
|
||||
rw.txt="八字绕环"
|
||||
}
|
||||
if(current_task==2)
|
||||
{
|
||||
rw.txt="直线加速"
|
||||
}
|
||||
if(current_task==3)
|
||||
{
|
||||
rw.txt="高速循迹"
|
||||
}
|
||||
if(current_task==4)
|
||||
{
|
||||
rw.txt="车检测试"
|
||||
}
|
||||
if(current_task==5)
|
||||
{
|
||||
rw.txt="EBS测试"
|
||||
}
|
||||
if(current_task==6)
|
||||
{
|
||||
rw.txt="手动驾驶"
|
||||
}
|
||||
bt0.val=0
|
||||
if(current_task==1)
|
||||
{
|
||||
bt0.val=1
|
||||
}
|
||||
bt1.val=0
|
||||
if(current_task==2)
|
||||
{
|
||||
bt1.val=1
|
||||
}
|
||||
bt2.val=0
|
||||
if(current_task==3)
|
||||
{
|
||||
bt2.val=1
|
||||
}
|
||||
bt3.val=0
|
||||
if(current_task==4)
|
||||
{
|
||||
bt3.val=1
|
||||
}
|
||||
bt4.val=0
|
||||
if(current_task==5)
|
||||
{
|
||||
bt4.val=1
|
||||
}
|
||||
bt5.val=0
|
||||
if(current_task==6)
|
||||
{
|
||||
bt5.val=1
|
||||
}
|
||||
shown_task=current_task
|
||||
}
|
||||
if(lock_state!=shown_lock)
|
||||
{
|
||||
sd.txt="锁定未知"
|
||||
sd.pco=33840
|
||||
if(lock_state==1)
|
||||
{
|
||||
sd.txt="已锁定"
|
||||
sd.pco=2016
|
||||
}
|
||||
if(lock_state==2)
|
||||
{
|
||||
sd.txt="已解锁"
|
||||
sd.pco=63488
|
||||
}
|
||||
shown_lock=lock_state
|
||||
}
|
||||
if(ebs_state!=shown_ebs)
|
||||
{
|
||||
EBS.txt="EBS 未知"
|
||||
EBS.pco=33840
|
||||
EBS.bco=0
|
||||
if(ebs_state==1)
|
||||
{
|
||||
EBS.txt="EBS 正常"
|
||||
EBS.pco=65535
|
||||
EBS.bco=2016
|
||||
}
|
||||
if(ebs_state==2)
|
||||
{
|
||||
EBS.txt="EBS 故障"
|
||||
EBS.pco=65535
|
||||
EBS.bco=63488
|
||||
}
|
||||
shown_ebs=ebs_state
|
||||
}
|
||||
if(as_state!=shown_as)
|
||||
{
|
||||
xstr 330,379,174,53,4,33840,0,1,1,1,"无人未知"
|
||||
if(as_state==0)
|
||||
{
|
||||
xstr 330,379,174,53,4,65535,0,1,1,1,"AS OFF"
|
||||
}
|
||||
if(as_state==1)
|
||||
{
|
||||
xstr 330,379,174,53,4,65504,0,1,1,1,"AS Ready"
|
||||
}
|
||||
if(as_state==2)
|
||||
{
|
||||
xstr 330,379,174,53,4,65504,0,1,1,1,"AS Driving"
|
||||
}
|
||||
if(as_state==3)
|
||||
{
|
||||
xstr 330,379,174,53,4,31,0,1,1,1,"AS Finished"
|
||||
}
|
||||
if(as_state==4)
|
||||
{
|
||||
xstr 330,379,174,53,4,63488,0,1,1,1,"AS Emergency"
|
||||
}
|
||||
if(as_state==5)
|
||||
{
|
||||
xstr 330,379,174,53,4,2016,0,1,1,1,"Manual Driving"
|
||||
}
|
||||
shown_as=as_state
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
xstr 13,4,267,42,2,2047,0,1,1,1,"DEBUG 安全回路"
|
||||
xstr 283,4,392,42,2,33840,0,1,1,1,"灰未知 绿正常 红故障"
|
||||
draw 13,60,185,139,10565
|
||||
xstr 15,64,170,32,4,65535,0,1,1,1,"配电箱"
|
||||
draw 213,60,385,139,10565
|
||||
xstr 215,64,170,32,4,65535,0,1,1,1,"左电机互锁"
|
||||
draw 413,60,585,139,10565
|
||||
xstr 415,64,170,32,4,65535,0,1,1,1,"左急停"
|
||||
draw 613,60,785,139,10565
|
||||
xstr 615,64,170,32,4,65535,0,1,1,1,"电池箱"
|
||||
draw 213,148,385,228,10565
|
||||
xstr 215,152,170,32,4,65535,0,1,1,1,"回路末端"
|
||||
draw 413,148,585,228,10565
|
||||
xstr 415,152,170,32,4,65535,0,1,1,1,"驾舱/右急停"
|
||||
draw 613,148,785,228,10565
|
||||
xstr 615,152,170,32,4,65535,0,1,1,1,"行程/惯性"
|
||||
line 187,99,213,99,2047
|
||||
line 207,94,213,99,2047
|
||||
line 207,104,213,99,2047
|
||||
line 387,99,413,99,2047
|
||||
line 407,94,413,99,2047
|
||||
line 407,104,413,99,2047
|
||||
line 587,99,613,99,2047
|
||||
line 607,94,613,99,2047
|
||||
line 607,104,613,99,2047
|
||||
line 787,99,797,99,2047
|
||||
line 797,99,797,187,2047
|
||||
line 797,187,787,187,2047
|
||||
line 587,187,613,187,2047
|
||||
line 593,182,587,187,2047
|
||||
line 593,192,587,187,2047
|
||||
line 387,187,413,187,2047
|
||||
line 393,182,387,187,2047
|
||||
line 393,192,387,187,2047
|
||||
draw 13,242,385,321,10565
|
||||
xstr 15,245,370,34,4,50712,0,1,1,1,"RES"
|
||||
draw 413,242,785,321,10565
|
||||
xstr 415,245,370,34,4,50712,0,1,1,1,"主控盒"
|
||||
draw 13,332,185,404,10565
|
||||
xstr 15,335,170,34,4,2047,0,1,1,1,"EBS 舵机"
|
||||
draw 213,332,385,404,10565
|
||||
xstr 215,335,170,34,4,2047,0,1,1,1,"EBS 电磁阀"
|
||||
draw 413,332,585,404,10565
|
||||
xstr 415,335,170,34,4,2047,0,1,1,1,"EBS 气压"
|
||||
draw 613,332,785,404,10565
|
||||
xstr 615,335,170,34,4,2047,0,1,1,1,"EBS 油压"
|
||||
draw 13,409,185,478,10565
|
||||
xstr 15,413,170,34,4,2047,0,1,1,1,"无人驾驶惯导"
|
||||
draw 213,409,385,478,10565
|
||||
xstr 215,413,170,34,4,2047,0,1,1,1,"无人驾驶轮速"
|
||||
draw 413,409,585,478,10565
|
||||
xstr 415,413,170,34,4,2047,0,1,1,1,"无人驾驶相机"
|
||||
draw 613,409,785,478,10565
|
||||
xstr 615,413,170,34,4,2047,0,1,1,1,"主控盒12V"
|
||||
if(d0==1)
|
||||
{
|
||||
t0.txt="正常"
|
||||
t0.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d0==2)
|
||||
{
|
||||
t0.txt="故障"
|
||||
t0.pco=63488
|
||||
}else
|
||||
{
|
||||
t0.txt="未知"
|
||||
t0.pco=33840
|
||||
}
|
||||
}
|
||||
if(d1==1)
|
||||
{
|
||||
t1.txt="正常"
|
||||
t1.pco=2016
|
||||
t3.txt="正常"
|
||||
t3.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d1==2)
|
||||
{
|
||||
t1.txt="故障"
|
||||
t1.pco=63488
|
||||
t3.txt="故障"
|
||||
t3.pco=63488
|
||||
}else
|
||||
{
|
||||
t1.txt="未知"
|
||||
t1.pco=33840
|
||||
t3.txt="未知"
|
||||
t3.pco=33840
|
||||
}
|
||||
}
|
||||
if(d2==1)
|
||||
{
|
||||
t2.txt="正常"
|
||||
t2.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d2==2)
|
||||
{
|
||||
t2.txt="故障"
|
||||
t2.pco=63488
|
||||
}else
|
||||
{
|
||||
t2.txt="未知"
|
||||
t2.pco=33840
|
||||
}
|
||||
}
|
||||
if(d3==1)
|
||||
{
|
||||
t4.txt="正常"
|
||||
t4.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d3==2)
|
||||
{
|
||||
t4.txt="故障"
|
||||
t4.pco=63488
|
||||
}else
|
||||
{
|
||||
t4.txt="未知"
|
||||
t4.pco=33840
|
||||
}
|
||||
}
|
||||
if(d4==1)
|
||||
{
|
||||
t5.txt="正常"
|
||||
t5.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d4==2)
|
||||
{
|
||||
t5.txt="故障"
|
||||
t5.pco=63488
|
||||
}else
|
||||
{
|
||||
t5.txt="未知"
|
||||
t5.pco=33840
|
||||
}
|
||||
}
|
||||
if(d5==1)
|
||||
{
|
||||
t6.txt="正常"
|
||||
t6.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d5==2)
|
||||
{
|
||||
t6.txt="故障"
|
||||
t6.pco=63488
|
||||
}else
|
||||
{
|
||||
t6.txt="未知"
|
||||
t6.pco=33840
|
||||
}
|
||||
}
|
||||
if(d6==1)
|
||||
{
|
||||
t7.txt="正常"
|
||||
t7.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d6==2)
|
||||
{
|
||||
t7.txt="故障"
|
||||
t7.pco=63488
|
||||
}else
|
||||
{
|
||||
t7.txt="未知"
|
||||
t7.pco=33840
|
||||
}
|
||||
}
|
||||
if(d7==1)
|
||||
{
|
||||
t8.txt="正常"
|
||||
t8.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d7==2)
|
||||
{
|
||||
t8.txt="故障"
|
||||
t8.pco=63488
|
||||
}else
|
||||
{
|
||||
t8.txt="未知"
|
||||
t8.pco=33840
|
||||
}
|
||||
}
|
||||
if(d8==1)
|
||||
{
|
||||
t9.txt="正常"
|
||||
t9.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d8==2)
|
||||
{
|
||||
t9.txt="故障"
|
||||
t9.pco=63488
|
||||
}else
|
||||
{
|
||||
t9.txt="未知"
|
||||
t9.pco=33840
|
||||
}
|
||||
}
|
||||
if(d9==1)
|
||||
{
|
||||
t10.txt="正常"
|
||||
t10.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d9==2)
|
||||
{
|
||||
t10.txt="故障"
|
||||
t10.pco=63488
|
||||
}else
|
||||
{
|
||||
t10.txt="未知"
|
||||
t10.pco=33840
|
||||
}
|
||||
}
|
||||
if(d10==1)
|
||||
{
|
||||
t11.txt="正常"
|
||||
t11.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d10==2)
|
||||
{
|
||||
t11.txt="故障"
|
||||
t11.pco=63488
|
||||
}else
|
||||
{
|
||||
t11.txt="未知"
|
||||
t11.pco=33840
|
||||
}
|
||||
}
|
||||
if(d11==1)
|
||||
{
|
||||
t12.txt="正常"
|
||||
t12.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d11==2)
|
||||
{
|
||||
t12.txt="故障"
|
||||
t12.pco=63488
|
||||
}else
|
||||
{
|
||||
t12.txt="未知"
|
||||
t12.pco=33840
|
||||
}
|
||||
}
|
||||
if(d12==1)
|
||||
{
|
||||
t13.txt="正常"
|
||||
t13.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d12==2)
|
||||
{
|
||||
t13.txt="故障"
|
||||
t13.pco=63488
|
||||
}else
|
||||
{
|
||||
t13.txt="未知"
|
||||
t13.pco=33840
|
||||
}
|
||||
}
|
||||
if(d13==1)
|
||||
{
|
||||
t14.txt="正常"
|
||||
t14.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d13==2)
|
||||
{
|
||||
t14.txt="故障"
|
||||
t14.pco=63488
|
||||
}else
|
||||
{
|
||||
t14.txt="未知"
|
||||
t14.pco=33840
|
||||
}
|
||||
}
|
||||
if(d14==1)
|
||||
{
|
||||
t15.txt="正常"
|
||||
t15.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d14==2)
|
||||
{
|
||||
t15.txt="故障"
|
||||
t15.pco=63488
|
||||
}else
|
||||
{
|
||||
t15.txt="未知"
|
||||
t15.pco=33840
|
||||
}
|
||||
}
|
||||
if(d15==1)
|
||||
{
|
||||
t16.txt="正常"
|
||||
t16.pco=2016
|
||||
}else
|
||||
{
|
||||
if(d15==2)
|
||||
{
|
||||
t16.txt="故障"
|
||||
t16.pco=63488
|
||||
}else
|
||||
{
|
||||
t16.txt="未知"
|
||||
t16.pco=33840
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user