This commit is contained in:
sunbeam 2024-03-02 13:42:33 +08:00
parent f0548223d5
commit d776e4680c
7 changed files with 61 additions and 18 deletions

View File

@ -12,6 +12,7 @@
<file name="setting.aardio" path="dlg\setting.aardio" comment="dlg\setting.aardio"/>
<file name="show.aardio" path="dlg\show.aardio" comment="dlg\show.aardio"/>
<file name="switch.aardio" path="dlg\switch.aardio" comment="dlg\switch.aardio"/>
<file name="rework.aardio" path="dlg\rework.aardio" comment="dlg\rework.aardio"/>
</folder>
<folder name="CANThread" path="CANThread" comment="CANThread" local="false" embed="true" ignored="false">
<file name="CanThread.aardio" path="CANThread\CanThread.aardio" comment="CANThread\CanThread.aardio"/>

View File

@ -17,6 +17,7 @@ V2.5: 巡航等按键增加第二路信号显示,增加调试帧开关
V2.6: 修复右边2个按键信号和基线没显示数值问题
V2.7: 信号界面增加左右按下状态
V2.8: 增加显示错误信息
v2.9: 修复诊断错误信号关联错误;增加读取振动参数
*/
winform.button.oncommand = function(id,event){

View File

@ -6,6 +6,9 @@ btn1001={cls="button";text="默认会话";left=28;top=58;right=115;bottom=88;ah=
btn1003={cls="button";text="扩展会话";left=126;top=58;right=213;bottom=88;ah=1;aw=1;z=5};
btnConvert={cls="button";text="转换";left=541;top=463;right=619;bottom=493;ah=1;aw=1;z=46};
btnRead7022={cls="button";text="预压值";left=232;top=212;right=319;bottom=242;ah=1;aw=1;z=54};
btnRead9002={cls="button";text="读取";left=294;top=409;right=382;bottom=439;z=59};
btnRead9003={cls="button";text="读取";left=293;top=449;right=381;bottom=479;z=60};
btnRead9004={cls="button";text="读取";left=294;top=486;right=382;bottom=516;z=61};
btnReadConfig={cls="button";text="读取配置";left=531;top=545;right=625;bottom=578;z=48};
btnReadF187={cls="button";text="ECU零件号";left=232;top=255;right=319;bottom=285;ah=1;aw=1;z=18};
btnReadF18A={cls="button";text="供应商ID";left=35;top=255;right=122;bottom=285;ah=1;aw=1;z=19};
@ -31,7 +34,7 @@ cbbMotorGain={cls="combobox";left=42;top=449;right=172;bottom=475;ah=1;aw=1;edge
combobox={cls="combobox";left=408;top=508;right=629;bottom=534;edge=1;font=LOGFONT(h=-18);items={};mode="dropdown";z=47};
edDACPeriod={cls="edit";text="80";left=42;top=487;right=172;bottom=519;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);num=1;z=50};
edFactor={cls="edit";text="1.0";left=457;top=464;right=531;bottom=491;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);z=44};
edLog={cls="edit";left=649;top=12;right=970;bottom=586;ah=1;aw=1;edge=1;font=LOGFONT(h=-18);multiline=1;z=12};
edLog={cls="edit";left=649;top=12;right=970;bottom=586;ah=1;autohscroll=false;aw=1;edge=1;font=LOGFONT(h=-18);multiline=1;z=12};
edPressTh1={cls="edit";text="500";left=531;top=97;right=605;bottom=124;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);num=1;z=9};
edPressTh2={cls="edit";text="500";left=531;top=136;right=605;bottom=163;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);num=1;z=37};
edPressTh3={cls="edit";text="500";left=531;top=175;right=605;bottom=202;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);num=1;z=38};
@ -43,7 +46,7 @@ edPressTh8={cls="edit";text="500";left=531;top=373;right=605;bottom=400;ah=1;ali
edWaveID={cls="edit";text="0";left=42;top=528;right=149;bottom=560;ah=1;align="center";aw=1;edge=1;font=LOGFONT(h=-18);multiline=1;num=1;z=56};
groupbox={cls="groupbox";text="标定";left=398;top=13;right=638;bottom=586;ah=1;aw=1;edge=1;z=1};
groupbox2={cls="groupbox";text="读取DID";left=20;top=181;right=329;bottom=347;ah=1;aw=1;edge=1;z=3};
groupbox3={cls="groupbox";text="震动";left=20;top=351;right=329;bottom=580;ah=1;aw=1;edge=1;z=2};
groupbox3={cls="groupbox";text="震动";left=20;top=351;right=390;bottom=580;ah=1;aw=1;edge=1;z=2};
rbLeft={cls="radiobutton";text="左侧";left=61;top=15;right=115;bottom=35;ah=1;aw=1;bgcolor=16777215;checked=1;group=1;z=7};
rbPressTh={cls="radiobutton";text="压力";left=440;top=35;right=506;bottom=61;ah=1;aw=1;bgcolor=16777215;checked=1;group=1;z=15};
rbRight={cls="radiobutton";text="右侧";left=141;top=15;right=195;bottom=35;ah=1;aw=1;bgcolor=16777215;z=8};
@ -91,7 +94,8 @@ Diag3E_Timer.onTimer = function(){
Display = function(str){
var nowtime = time();
nowtime.format="%H:%M:%S";
winform.edLog.print(tostring(nowtime) + " " + str);
var side = winform.rbLeft.checked?"左侧":"右侧";
winform.edLog.print(tostring(nowtime) ++ " " ++ side ++ str);
}
@ -121,17 +125,25 @@ winform.cb3E.oncommand = function(id,event){
}
}
//import console;
GetReadThResp = function(did){
var ret = CT_GetLastDiagResp();
if(ret == null){
return 0;
}
if(ret.sid == 0x62 && (#ret.data >= 4)){
if(ret.sid == 0x62 && (ret.len >= 3)){
var getdid = (ret.data[1]<<8) + ret.data[2];
if(getdid == did){
if(getdid != did){
return 0;
}
//console.dumpJson(ret);
if(ret.len == 4){
var val = (ret.data[3]<<8) + ret.data[4];
return val;
return val;
}
if(ret.len == 3){
var val = ret.data[3];
return val;
}
}
return 0;
@ -325,6 +337,36 @@ winform.btnWrite9005.oncommand = function(id,event){
CT_Diag2EVal1B(0x9005,val);
}
winform.btnRead9002.oncommand = function(id,event){
var did = 0x9002;
CT_Diag22(did);
win.delay(50,1);
var ret = GetReadThResp(did);
if(ret < 8){
winform.cbbDacRef.selIndex = ret + 1;
}
}
winform.btnRead9003.oncommand = function(id,event){
var did = 0x9003;
CT_Diag22(did);
win.delay(50,1);
var ret = GetReadThResp(did);
if(ret < 4){
winform.cbbMotorGain.selIndex = ret + 1;
}
}
winform.btnRead9004.oncommand = function(id,event){
var did = 0x9004;
CT_Diag22(did);
win.delay(50,1);
var ret = GetReadThResp(did);
if(ret != 0){
winform.edDACPeriod.text = ret;
}
}
winform.spin.buddy = winform.edWaveID;
winform.spin.setRange(0,14); //一定要设置数值的上下限
winform.spin.pos = 0;//设置数值

View File

@ -9,7 +9,7 @@ cbbDev={cls="combobox";left=127;top=123;right=376;bottom=149;dl=1;dt=1;edge=1;it
plus={cls="plus";text="全屏";left=133;top=316;right=216;bottom=347;align="left";dl=1;dt=1;font=LOGFONT(h=-15);iconStyle={align="left";font=LOGFONT(h=-15;name='FontAwesome')};iconText='\uF0C8 ';notify=1;textPadding={left=24};z=7};
plus5={cls="plus";text="English";left=130;top=264;right=248;bottom=295;align="left";dl=1;dt=1;font=LOGFONT(h=-20;name='FontAwesome');iconStyle={align="left";font=LOGFONT(h=-16;name='FontAwesome');padding={left=5}};iconText='\uF0C8';notify=1;textPadding={left=30};z=1};
static={cls="static";left=128;top=65;right=441;bottom=81;transparent=1;z=6};
static4={cls="static";text="V2.8 20230818";left=745;top=4;right=981;bottom=35;align="right";font=LOGFONT(h=-22);notify=1;transparent=1;z=4}
static4={cls="static";text="V2.9 20240302";left=745;top=4;right=981;bottom=35;align="right";font=LOGFONT(h=-22);notify=1;transparent=1;z=4}
)
/*}}*/

View File

@ -6,8 +6,8 @@ show = win.form(text="P417上位机";right=984;bottom=602;bgcolor=16777215;borde
show.add(
bkplus={cls="bkplus";left=49;top=93;right=880;bottom=372;ah=1;aw=1;background="\res\P417.png";z=1};
button={cls="button";text="Button";left=381;top=425;right=507;bottom=451;hide=1;z=31};
button2={cls="button";text="左";left=253;top=512;right=352;bottom=571;z=43};
button3={cls="button";text="右";left=437;top=512;right=536;bottom=571;z=44};
button2={cls="button";text="左";left=253;top=512;right=352;bottom=571;hide=1;z=43};
button3={cls="button";text="右";left=437;top=512;right=536;bottom=571;hide=1;z=44};
checkbox={cls="checkbox";text="点亮";left=112;top=31;right=198;bottom=68;ah=1;aw=1;bgcolor=16777215;checked=1;font=LOGFONT(h=-22);z=3};
checkbox2={cls="checkbox";text="白天";left=208;top=32;right=294;bottom=69;ah=1;aw=1;bgcolor=16777215;font=LOGFONT(h=-22);z=20};
checkbox3={cls="checkbox";text="发送";left=20;top=30;right=106;bottom=67;ah=1;aw=1;bgcolor=16777215;checked=1;font=LOGFONT(h=-22);z=42};
@ -105,7 +105,7 @@ DisplayKey = function(){
show.stRightTF.text = RightTouchFault;
show.stRightVF.text = RightVibrationFault;
show.stRightPF.text = RightPressSensorFault;
show.stRightCommonFaullt.text = LeftTouchFault;
show.stRightCommonFaullt.text = RightCommonFault;
Displayl("get 0x300 (" + plx + ',' + ply + ') status:' + pls);
if((plx == 0)&&(ply == 0))
{

View File

@ -3,10 +3,10 @@ import fonts.fontAwesome;
/*DSG{{*/
var winform = win.form(text="wubiLex - 帮助";right=984;bottom=607;bgcolor=16777215;style=33554432)
winform.add(
button={cls="button";text="信号";left=238;top=563;right=285;bottom=597;z=137};
button2={cls="button";text="信号";left=656;top=547;right=703;bottom=581;z=138};
button3={cls="button";text="基线";left=183;top=564;right=230;bottom=598;z=139};
button4={cls="button";text="基线";left=605;top=546;right=652;bottom=580;z=140};
button={cls="button";text="信号";left=238;top=563;right=285;bottom=597;hide=1;z=137};
button2={cls="button";text="信号";left=656;top=547;right=703;bottom=581;hide=1;z=138};
button3={cls="button";text="基线";left=183;top=564;right=230;bottom=598;hide=1;z=139};
button4={cls="button";text="基线";left=605;top=546;right=652;bottom=580;hide=1;z=140};
pgl1={cls="progress";left=52;top=38;right=191;bottom=48;color=12639424;dl=0.05;dt=1;edge=1;max=100;min=0;z=18};
pgl2={cls="progress";left=52;top=78;right=191;bottom=88;color=12639424;dl=0.05;dt=1;edge=1;max=100;min=0;z=19};
pgl3={cls="progress";left=52;top=118;right=191;bottom=128;color=12639424;dl=0.05;dt=1;edge=1;max=100;min=0;z=20};

View File

@ -10,6 +10,7 @@ navDiag={cls="plus";text="诊断";left=421;top=5;right=541;bottom=40;align="left
navFirst={cls="plus";text="控制";left=180;top=5;right=300;bottom=40;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF00A';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=3};
navHelp={cls="plus";text="信号";left=300;top=5;right=420;bottom=40;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF012';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=7};
navSetting={cls="plus";text="设置";left=541;top=5;right=661;bottom=40;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF0AD';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=6};
plus={cls="plus";text="返工";left=661;top=5;right=781;bottom=40;align="left";color=16777215;dl=1;dt=1;font=LOGFONT(h=-16);iconStyle={align="left";font=LOGFONT(h=-19;name='FontAwesome');padding={left=12;top=4}};iconText='\uF0AD';notify=1;paddingLeft=1;paddingRight=1;paddingTop=3;textPadding={left=39;bottom=1};x=0.5;y=0.2;z=9};
titleBar={cls="bkplus";left=0;top=0;right=985;bottom=41;bgcolor=14977280;dl=1;dr=1;dt=1;z=2}
)
/*}}*/
@ -64,8 +65,6 @@ mainForm.navFirst.oncommand = function(id,event){
}
tbs.selIndex = 4;
mainForm.show();
//mainForm.fullscreen();
return win.loopMessage();