|
|
@ -38,7 +38,7 @@ SocketCan::SocketCanError_t SocketCan::writeFrame(const canfd_frame_t &frame) { |
|
|
|
} |
|
|
|
|
|
|
|
SocketCan::SocketCanError_t SocketCan::sendFrame(shared_ptr<SocketCanFrame> frame, int overtime) { |
|
|
|
tp_steady start = tu_steady().now(); |
|
|
|
tp_steady start = tu_steady().now(); |
|
|
|
while (tu_steady().elapsedTimeMs(start) < overtime && isTxing()) { |
|
|
|
usleep(100); |
|
|
|
} |
|
|
@ -250,7 +250,7 @@ int SocketCan::dumpCanDriverInfo(string canDevice, int baudrate) { |
|
|
|
can_filter_t zerofilter = {0}; |
|
|
|
int recv_own_msgs = 0; /* 0 = disabled (default), 1 = enabled */ |
|
|
|
int localloop = 0; |
|
|
|
int ret = 0; |
|
|
|
int ret = 0; |
|
|
|
fd_set readfds, readFileDescriptors; |
|
|
|
timeval waitTime; |
|
|
|
int loopTime = 0; |
|
|
@ -374,7 +374,7 @@ void SocketCan::socketCanReadThreadLoop() { |
|
|
|
} |
|
|
|
|
|
|
|
if (canframe.can_id & CAN_ERR_FLAG) { |
|
|
|
logger->error("error frame {:x},{}", canframe.can_id, StringUtils().bytesToString(canframe.data, canframe.len)); |
|
|
|
logger->error("rx can-bus error event {:x},{}", canframe.can_id, StringUtils().bytesToString(canframe.data, canframe.len)); |
|
|
|
} else { |
|
|
|
// logger->info("TX:{} {} {}", canframe.can_id, canframe.__res0, canframe.__res1);
|
|
|
|
if (!tryUpdateTxState(canframe)) { |
|
|
|