hello
@Manuel_Salasthe follows is one uart code,maybe not the reseaon.because it have not happened after disconnecting the WIFI .
SerialPortInfo spInfo{"/dev/ttymxc3",
115200,
QSerialPort::DataBits::Data8,
QSerialPort::Parity::NoParity,
QSerialPort::StopBits::OneStop};
m_transceiver = std::make_shared<Transceiver>(spInfo);
connect(m_serialPtr.get(), &QSerialPort::readyRead,this, &Transceiver::SlotRcvData, Qt::QueuedConnection);// 读取数据
void Transceiver::SlotRcvData()
{
// 接收逻辑
QByteArray buffer = m_serialPtr->readAll();
if (!buffer.isEmpty())
{
for(const auto func : m_recvNoticeFuncs)
{
if (func)
{
func(std::move(buffer)); //回调通知上层,上传接收到数据帧
}
}
}
if ((DEBUG_PRINT_READ == 1 && m_serialPtr->portName() == DEBUG_PORT) || m_recvPrintFlag.load())
{
QString printStr = QString("Len(%1) ").arg(buffer.count());
printStr += buffer.toHex(' ');
qDebug(uart) << QString("%1-[%2 recv] <<= %3").arg(QDateTime::currentDateTime().toMSecsSinceEpoch()).arg(m_serialPtr->portName()).arg(printStr);
}
}