if(true == m_SendHex)//十进制发送
{
m_SerialPort->write(QByteArray::fromHex(strMsg.toLatin1()));
}
else//ASCII发送
{
m_SerialPort->write(strMsg.toLocal8Bit());
}
m_SerialPort->waitForBytesWritten(100);
QSerial发送ASCII和发送十进制
最新推荐文章于 2024-05-06 15:47:25 发布