添加对hmi屏幕的支持,赋码仪按键按下时发送赋码请求
This commit is contained in:
@@ -69,7 +69,7 @@ myarray codec_m4::decode(int &srcAddr, int &dstAddr, int &cmd, myarray data)
|
||||
// qDebug("m4 recv:%s",data.toHex(' ').data());
|
||||
if (packCheck(data))
|
||||
{
|
||||
return data.mid(2);
|
||||
return data.mid(2,data[1]);
|
||||
}
|
||||
return myarray();
|
||||
}
|
||||
|
@@ -60,7 +60,13 @@ InterFace *if_uart_hmi()
|
||||
static InterFace *if_ = nullptr;
|
||||
if (if_ == nullptr)
|
||||
{
|
||||
if_ = new if_uart("/dev/ttySTM1", 115200);
|
||||
char *dev=nullptr;
|
||||
if(syscfg()->device_type=="hmi_coder"){
|
||||
dev="/dev/ttySTM3";
|
||||
}else{
|
||||
dev="/dev/ttySTM1";
|
||||
}
|
||||
if_ = new if_uart(dev, 115200);
|
||||
// QTimer::singleShot(0, if_, &InterFace::init);
|
||||
if_->init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user