Changeset - 1132b19725a5
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-10-06 17:43:57
hy@ozderya.net
implemented ASCII command sending
1 file changed with 18 insertions and 1 deletions:
0 comments (0 inline, 0 general)
commandpanel.cpp
Show inline comments
 
@@ -48,5 +48,22 @@ void CommandPanel::newCommand()
 

	
 
void CommandPanel::sendCommand(QString command, bool ascii)
 
{
 
    qDebug() << "command:" << command;
 
    if (!serialPort->isOpen())
 
    {
 
        qCritical() << "Port is not open!";
 
        return;
 
}
 

	
 
    if (ascii)
 
    {
 
        qDebug() << "Sending" << command;
 
        if (serialPort->write(command.toLatin1()) < 0)
 
        {
 
            qCritical() << "Send command failed!";
 
        }
 
    }
 
    else
 
    {
 
        qCritical("NYI");
 
    }
 
}
0 comments (0 inline, 0 general)