添加对hmi屏幕的支持,赋码仪按键按下时发送赋码请求
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "interface/if_can.h"
|
||||
#include "elec/mystring.h"
|
||||
#include "prot/prot_pc.h"
|
||||
#include "elec/elec_judge.h"
|
||||
|
||||
|
||||
|
||||
@@ -291,9 +292,17 @@ cmdline_export(cfginfo, cfginfo, get cfg info.);
|
||||
|
||||
|
||||
void cmd_line_slots::auto_test(){
|
||||
ProtPc *pc=protPc();
|
||||
check_cfg *ccfg_=check_plan();
|
||||
if(syscfg()->auto_test>0){
|
||||
ProtPc *pc=protPc();
|
||||
pc->send_data_slot(0x37,myarray(1,char(0)));
|
||||
if(syscfg()->device_type=="checker"){
|
||||
pc->send_data_slot(0x37,myarray(1,char(0)));
|
||||
}else{
|
||||
int chip=elec_extract_chip(ccfg_->get_plan_id());
|
||||
QByteArray r;
|
||||
r.append(char(chip));
|
||||
pc->send_data_slot(0x8b,r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,3 +394,37 @@ cmdline_export(cfgset, cfgset, set cfg info.);
|
||||
|
||||
|
||||
|
||||
static QList<int>sort(QList<int> in){
|
||||
int temp;
|
||||
int num=in.size();
|
||||
for(int i=0;i<num;i++){
|
||||
temp=in[i];
|
||||
for(int j=i+1;j<num;j++){
|
||||
if(in[i]>in[j]){
|
||||
in[i]=in[j];
|
||||
in[j]=temp;
|
||||
temp=in[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return in;
|
||||
}
|
||||
|
||||
static void pclist(QList<myarray> args){
|
||||
command *c=command_start();
|
||||
ProtPc *pc=protPc();
|
||||
QList<int> list=handlePcList();
|
||||
mystring s;
|
||||
list=sort(list);
|
||||
for (int i=0;i<list.size();i++){
|
||||
s.append(mystring::asprintf("0x%02x,",list[i]));
|
||||
}
|
||||
c->send(s.data());
|
||||
}
|
||||
cmdline_export(pclist, pclist, print pc cmd list.);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user