异常判定在出错时才打印,检测时通信异常蜂鸣器响一声
取消一些通信日志打印
This commit is contained in:
@@ -182,7 +182,7 @@ void can_host::recv_data_cb()
|
||||
// 不分段
|
||||
slave.clear();
|
||||
slave.append(payload);
|
||||
qDebug()<<"can recv from:"<<slave_addr<<slave.get_data().toHex(' ');
|
||||
// qDebug()<<"can recv from:"<<slave_addr<<slave.get_data().toHex(' ');
|
||||
if (dst_addr == 0){
|
||||
if (irq_fun){
|
||||
irq_fun(myarray(slave.get_data()));
|
||||
@@ -206,7 +206,7 @@ void can_host::recv_data_cb()
|
||||
// 尾段
|
||||
slave.append(payload);
|
||||
if (slave.get_pack_num() - 1 == seg_num){
|
||||
qDebug()<<"can recv from:"<<slave_addr<<slave.get_data().toHex(' ');
|
||||
// qDebug()<<"can recv from:"<<slave_addr<<slave.get_data().toHex(' ');
|
||||
if (dst_addr == 0){
|
||||
if (irq_fun){
|
||||
irq_fun(myarray(slave.get_data()));
|
||||
@@ -229,7 +229,7 @@ void can_host::recv_data_cb()
|
||||
|
||||
int can_host::write(int dst,myarray data)
|
||||
{
|
||||
qDebug()<<"can send to:"<<dst<<data.toHex(' ');
|
||||
// qDebug()<<"can send to:"<<dst<<data.toHex(' ');
|
||||
append(dst, 1, data);
|
||||
// qDebug("can send end.");
|
||||
return data.size();
|
||||
|
Reference in New Issue
Block a user