# HG changeset patch # User Hasan Yavuz Ă–ZDERYA # Date 2015-10-10 13:52:59 # Node ID 51e636c4e69bf7c1c397d44103c3e2b217ea7eaf # Parent 40c94e30a04292445e9078e39cf84056230ab946 implemented sending hex command diff --git a/commandpanel.cpp b/commandpanel.cpp --- a/commandpanel.cpp +++ b/commandpanel.cpp @@ -20,6 +20,7 @@ #include "commandpanel.h" #include "ui_commandpanel.h" +#include #include CommandPanel::CommandPanel(QSerialPort* port, QWidget *parent) : @@ -64,6 +65,9 @@ void CommandPanel::sendCommand(QString c } else { - qCritical("NYI"); + if (serialPort->write(QByteArray::fromHex(command.toLatin1())) < 0) + { + qCritical() << "Send command failed!"; + } } }