Hi,
Here my task is writing the data to the rs-232 port with maintaining some delay.i used qextserialport for writing the data.
My task requires after writing the "nsheet" to the port maintain some delay and after i have to write sheet parameters,for that i used singleshot function of Qtimer,but after writing the "nsheet" my timer will not execute corresponding slot,hyperterminal will not display sheet parameters.
can anybody solve my problem.
thanks.
nsheet.append("0");
nsheet.
append(QString::number(counter,
10));
nsheet.append("@");
port->write(nsheet);
if (ui.checkBox->isChecked())
QTimer::singleShot(200,
this,
SLOT(SHEET1
(sheet1
)))
QByteArray nsheet("B0");
nsheet.append("0");
nsheet.append(QString::number(counter,10));
nsheet.append("@");
port->open(QIODevice::ReadWrite);
port->write(nsheet);
if (ui.checkBox->isChecked())
QTimer::singleShot(200,this,SLOT(SHEET1(sheet1)))
To copy to clipboard, switch view to plain text mode
{
sheet.append(sheet1);
sheet.remove(0,sheet1.indexOf("C",0)+1);
sheet.prepend("C1");
sheet.append("@");
port->write(sheet);
}
void RadarControl::SHEET1(QByteArray &sheet1)
{
QByteArray sheet("");
sheet.append(sheet1);
sheet.remove(0,sheet1.indexOf("C",0)+1);
sheet.prepend("C1");
sheet.append("@");
port->open(QIODevice::ReadWrite);
port->write(sheet);
}
To copy to clipboard, switch view to plain text mode
Bookmarks