diff --git a/default.aproj b/default.aproj index e3ed578..4048a0f 100644 --- a/default.aproj +++ b/default.aproj @@ -5,21 +5,21 @@ - - - - + + - - + - - + + + + + diff --git a/main.aardio b/main.aardio index 3d5811d..a67f44d 100644 --- a/main.aardio +++ b/main.aardio @@ -35,6 +35,7 @@ import win.timer; var boot_count = 0;//boot时间计数器 var bootstate = false;//boot状态标志 +var starttime = time.now(); timer_bootcount = win.timer(mainForm,100); timer_bootcount.onTimer = function(){//boot时间定时器,100ms间隔 boot_count++; @@ -126,10 +127,11 @@ listener.$Connected = function(){ flag_connected = 1; } listener.$SendEnd = function(isSuccess){ - timer_bootcount.disable(); + //timer_bootcount.disable(); + var usetime = time.now().diffsecond(starttime); bootstate = false; if(isSuccess == true){ - Display("刷写成功,用时 " + boot_count/10 + " S") + Display("刷写成功,用时 " + usetime + " S") } } @@ -139,7 +141,7 @@ var CanThread = function(){ //线程函数内部要添加自已的import语句 import win; import console; - console.log("线程开始运行") + //console.log("线程开始运行") loadcodex("\user\CanThread.aardio");//加载线程程序 //在子线程启动消息循环 win.loopMessage(FuncLoopMsg) @@ -189,7 +191,7 @@ mainForm.btnFlash.oncommand = function(id,event){ bootstate = true; mainForm.edit.text = ""; Display("开始刷写流程"); - timer_bootcount.enable(); + //timer_bootcount.enable(); boot_count = 0; DiagBootReq(); diff --git a/user/DiagBootcode.aardio b/user/DiagBootcode.aardio index de2372e..1a45174 100644 --- a/user/DiagBootcode.aardio +++ b/user/DiagBootcode.aardio @@ -83,9 +83,9 @@ FuncSendBlockInit = function(id){ return 1; } for(i=1;#alldata;1){ - len += math.ceil(#alldata[i]["data"] / 0x400) + len += math.ceil(#alldata[i]["data"] / 0x200) } - alldata_blocknum = len + 19; + alldata_blocknum = len; block_sended = 0; sendblockstate = 0; return 0;