更新振动参数

This commit is contained in:
sunbeam 2024-02-29 14:21:52 +08:00
parent 004bbc5b25
commit b034e820ba

View File

@ -6,6 +6,8 @@ show = win.form(text="P417上位机";right=984;bottom=602;bgcolor=16777215;borde
show.add( show.add(
bkplus={cls="bkplus";left=49;top=93;right=880;bottom=372;ah=1;aw=1;background="\res\P417.png";z=1}; 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}; 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};
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}; 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}; 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}; 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};
@ -289,6 +291,35 @@ show.checkbox3.oncommand = function(id,event){
} }
show.button2.oncommand = function(id,event){
CT_SetDiagID(0x720,0x620);
CT_Diag10(0x03);
win.delay(20,1);
CT_Diag2EVal1B(0x9001,0x01);
}
show.button3.oncommand = function(id,event){
CT_SetDiagID(0x710,0x610);
CT_Diag10(0x03);
win.delay(20,1);
CT_Diag2EVal1B(0x9001,0x01);
}
import win.ui.accelerator;
var accelerator = win.ui.accelerator({
{
alt = true; vkey = 'Q'#;
oncommand = function() show.button2.oncommand();//show.msgbox("ALT+1");
};
{
alt = true; vkey = 'W'#;
oncommand = function() show.button3.oncommand();//show.msgbox("ALT+2");
};
},show );
show.show(); show.show();
FreshPos(); FreshPos();
return win.loopMessage(); return win.loopMessage();