Compare commits

..

1 Commits

Author SHA1 Message Date
2f0eff2208 增加show界面显示按键状态 2024-12-05 09:49:52 +08:00

View File

@ -31,27 +31,33 @@ stKeyRleft={cls="static";text="Static";left=904;top=247;right=929;bottom=272;ah=
stKeyRok={cls="static";text="Static";left=904;top=322;right=929;bottom=347;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=16}; stKeyRok={cls="static";text="Static";left=904;top=322;right=929;bottom=347;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=16};
stKeyRright={cls="static";text="Static";left=904;top=285;right=929;bottom=310;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=19}; stKeyRright={cls="static";text="Static";left=904;top=285;right=929;bottom=310;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=19};
stKeyRup={cls="static";text="Static";left=904;top=172;right=929;bottom=197;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=15}; stKeyRup={cls="static";text="Static";left=904;top=172;right=929;bottom=197;ah=1;align="center";aw=1;bgcolor=65280;center=1;hide=1;z=15};
stLeftCommonFaullt={cls="static";text="0";left=190;top=531;right=212;bottom=556;font=LOGFONT(h=-18);transparent=1;z=37}; stLeftCommonFaullt={cls="static";text="0";left=195;top=569;right=217;bottom=594;font=LOGFONT(h=-18);transparent=1;z=37};
stLeftPF={cls="static";text="0";left=190;top=476;right=213;bottom=501;font=LOGFONT(h=-18);transparent=1;z=35}; stLeftPF={cls="static";text="0";left=195;top=514;right=218;bottom=539;font=LOGFONT(h=-18);transparent=1;z=35};
stLeftTF={cls="static";text="0";left=190;top=449;right=214;bottom=474;font=LOGFONT(h=-18);transparent=1;z=34}; stLeftTF={cls="static";text="0";left=195;top=487;right=219;bottom=512;font=LOGFONT(h=-18);transparent=1;z=34};
stLeftVF={cls="static";text="0";left=190;top=503;right=214;bottom=528;font=LOGFONT(h=-18);transparent=1;z=36}; stLeftVF={cls="static";text="0";left=195;top=541;right=219;bottom=566;font=LOGFONT(h=-18);transparent=1;z=36};
stLocl={cls="static";left=180;top=225;right=192;bottom=237;bgcolor=255;color=255;font=LOGFONT(name='FontAwesome');z=29}; stLocl={cls="static";left=180;top=225;right=220;bottom=265;align="center";bgcolor=65280;center=1;font=LOGFONT(name='FontAwesome');z=29};
stLocr={cls="static";left=790;top=226;right=802;bottom=238;bgcolor=255;color=255;font=LOGFONT(name='FontAwesome');z=30}; stLocr={cls="static";left=790;top=226;right=830;bottom=266;align="center";bgcolor=65280;center=1;font=LOGFONT(name='FontAwesome');z=30};
stRightCommonFaullt={cls="static";text="0";left=722;top=538;right=746;bottom=563;font=LOGFONT(h=-18);transparent=1;z=41}; stRightCommonFaullt={cls="static";text="0";left=722;top=538;right=746;bottom=563;font=LOGFONT(h=-18);transparent=1;z=41};
stRightPF={cls="static";text="0";left=722;top=483;right=746;bottom=508;font=LOGFONT(h=-18);transparent=1;z=39}; stRightPF={cls="static";text="0";left=722;top=483;right=746;bottom=508;font=LOGFONT(h=-18);transparent=1;z=39};
stRightTF={cls="static";text="0";left=722;top=456;right=746;bottom=481;font=LOGFONT(h=-18);transparent=1;z=38}; stRightTF={cls="static";text="0";left=722;top=456;right=746;bottom=481;font=LOGFONT(h=-18);transparent=1;z=38};
stRightVF={cls="static";text="0";left=722;top=510;right=746;bottom=535;font=LOGFONT(h=-18);transparent=1;z=40}; stRightVF={cls="static";text="0";left=722;top=510;right=746;bottom=535;font=LOGFONT(h=-18);transparent=1;z=40};
stZBl={cls="static";text="坐标";left=4;top=384;right=424;bottom=432;align="center";center=1;font=LOGFONT(h=-30);transparent=1;z=24}; stZBl={cls="static";text="坐标";left=3;top=368;right=423;bottom=416;align="center";center=1;font=LOGFONT(h=-30);transparent=1;z=24};
stZBr={cls="static";text="坐标";left=481;top=384;right=901;bottom=432;align="center";center=1;font=LOGFONT(h=-30);transparent=1;z=25}; stZBr={cls="static";text="坐标";left=481;top=384;right=901;bottom=432;align="center";center=1;font=LOGFONT(h=-30);transparent=1;z=25};
static={cls="static";text="0x305 RES status";left=97;top=412;right=266;bottom=447;font=LOGFONT(h=-20);notify=1;transparent=1;z=45};
static2={cls="static";text="亮度:";left=348;top=30;right=420;bottom=69;ah=1;align="center";aw=1;center=1;font=LOGFONT(h=-22);transparent=1;z=23}; static2={cls="static";text="亮度:";left=348;top=30;right=420;bottom=69;ah=1;align="center";aw=1;center=1;font=LOGFONT(h=-22);transparent=1;z=23};
static3={cls="static";text="触摸错误 static3={cls="static";text="触摸错误
压力错误 压力错误
震动错误 震动错误
其它错误";left=89;top=453;right=180;bottom=562;font=LOGFONT(h=-18);transparent=1;z=32}; 其它错误";left=94;top=491;right=185;bottom=600;font=LOGFONT(h=-18);transparent=1;z=32};
static4={cls="static";text="触摸错误 static4={cls="static";text="触摸错误
压力错误 压力错误
震动错误 震动错误
其它错误";left=624;top=460;right=715;bottom=569;font=LOGFONT(h=-18);transparent=1;z=33}; 其它错误";left=624;top=460;right=715;bottom=569;font=LOGFONT(h=-18);transparent=1;z=33};
static5={cls="static";text="0x305 ADAS status";left=95;top=437;right=269;bottom=472;font=LOGFONT(h=-20);notify=1;transparent=1;z=46};
static6={cls="static";text="0x305 CNCL status";left=96;top=460;right=271;bottom=495;font=LOGFONT(h=-20);transparent=1;z=47};
static7={cls="static";text="0";left=278;top=414;right=308;bottom=449;font=LOGFONT(h=-20);transparent=1;z=48};
static8={cls="static";text="0";left=279;top=437;right=309;bottom=472;font=LOGFONT(h=-20);transparent=1;z=49};
static9={cls="static";text="0";left=278;top=464;right=308;bottom=499;font=LOGFONT(h=-20);transparent=1;z=50};
stlight={cls="static";text="7";left=416;top=30;right=460;bottom=69;ah=1;align="center";aw=1;center=1;font=LOGFONT(h=-22);transparent=1;z=22}; stlight={cls="static";text="7";left=416;top=30;right=460;bottom=69;ah=1;align="center";aw=1;center=1;font=LOGFONT(h=-22);transparent=1;z=22};
trackbar={cls="trackbar";left=472;top=39;right=882;bottom=69;ah=1;aw=1;bgcolor=16777215;max=15;min=0;z=21} trackbar={cls="trackbar";left=472;top=39;right=882;bottom=69;ah=1;aw=1;bgcolor=16777215;max=15;min=0;z=21}
) )
@ -107,6 +113,9 @@ DisplayKey = function(){
show.stRightPF.text = RightPressSensorFault; show.stRightPF.text = RightPressSensorFault;
show.stRightCommonFaullt.text = RightCommonFault; show.stRightCommonFaullt.text = RightCommonFault;
Displayl("get 0x300 (" + plx + ',' + ply + ') status:' + pls); Displayl("get 0x300 (" + plx + ',' + ply + ') status:' + pls);
show.static7.text = keyL1;
show.static8.text = keyL2;
show.static9.text = keyL3;
if((plx == 0)&&(ply == 0)) if((plx == 0)&&(ply == 0))
{ {
show.stLocl.hide=1; show.stLocl.hide=1;
@ -115,6 +124,7 @@ DisplayKey = function(){
{ {
show.stLocl.hide=0; show.stLocl.hide=0;
SetLeftPos(plx,ply); SetLeftPos(plx,ply);
show.stLocl.redraw() show.stLocl.redraw()
} }
@ -128,6 +138,7 @@ DisplayKey = function(){
show.stLocr.hide=0; show.stLocr.hide=0;
SetRightPos(prx,pry); SetRightPos(prx,pry);
show.stLocr.redraw(); show.stLocr.redraw();
} }
} }
@ -205,17 +216,20 @@ Rrange.x,Rrange.y,Rrange.cx,Rrange.cy = show.plRight.getPos();
SetLeftPos = function(getx,gety){ SetLeftPos = function(getx,gety){
var posx = 0,posy = 0; var posx = 0,posy = 0;
posx = Lrange.x + Lrange.cx - (getx/255*Lrange.cx) - 6; posx = Lrange.x + Lrange.cx - (getx/255*Lrange.cx) - 6;
posy = Lrange.y + (gety/255*Lrange.cy) - 6; posy = Lrange.y + (gety/255*Lrange.cy) - 26;
show.stLocl.setPos(posx,posy); show.stLocl.setPos(posx,posy);
show.stLocl.text = pls;
} }
SetRightPos = function(getx,gety){ SetRightPos = function(getx,gety){
var posx = 0,posy = 0; var posx = 0,posy = 0;
if(getx == 0){ if(getx == 0){
getx = 45; getx = 60;
} }
posx = Rrange.x + (getx/255*Rrange.cx) - 6; posx = Rrange.x + (getx/255*Rrange.cx) - 40;
posy = Rrange.y + (gety/255*Rrange.cy) - 6; posy = Rrange.y + (gety/255*Rrange.cy) - 30;
show.stLocr.setPos(posx,posy); show.stLocr.setPos(posx,posy);
show.stLocr.text = prs;
} }
/* /*
@ -320,6 +334,7 @@ var accelerator = win.ui.accelerator({
},show ); },show );
show.show(); show.show();
FreshPos(); FreshPos();
return win.loopMessage(); return win.loopMessage();