Changeset - 51e636c4e69b
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-10-10 13:52:59
hy@ozderya.net
implemented sending hex command
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
commandpanel.cpp
Show inline comments
 
@@ -17,12 +17,13 @@
 
  along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "commandpanel.h"
 
#include "ui_commandpanel.h"
 

	
 
#include <QByteArray>
 
#include <QtDebug>
 

	
 
CommandPanel::CommandPanel(QSerialPort* port, QWidget *parent) :
 
    QWidget(parent),
 
    ui(new Ui::CommandPanel)
 
{
 
@@ -61,9 +62,12 @@ void CommandPanel::sendCommand(QString c
 
        {
 
            qCritical() << "Send command failed!";
 
        }
 
    }
 
    else
 
    {
 
        qCritical("NYI");
 
        if (serialPort->write(QByteArray::fromHex(command.toLatin1())) < 0)
 
        {
 
            qCritical() << "Send command failed!";
 
        }
 
    }
 
}
0 comments (0 inline, 0 general)