Changeset - 337bb486333f
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-05-18 16:14:58
hy@ozderya.net
skip byte button isn't used in ASCII mode, so disable it
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
mainwindow.cpp
Show inline comments
 
@@ -645,31 +645,32 @@ void MainWindow::selectNumberFormat(Numb
 
            break;
 
        case NumberFormat_ASCII:
 
            sampleSize = 0;    // these two members should not be used
 
            readSample = NULL; // in this mode
 
            break;
 
    }
 

	
 
    if (numberFormat == NumberFormat_ASCII)
 
    {
 
        QObject::disconnect(&(this->serialPort), &QSerialPort::readyRead, 0, 0);
 
        QObject::connect(&(this->serialPort), &QSerialPort::readyRead,
 
                         this, &MainWindow::onDataReadyASCII);
 

	
 
        ui->pbSkipByte->setDisabled(true);
 
    }
 
    else
 
    {
 
        QObject::disconnect(&(this->serialPort), &QSerialPort::readyRead, 0, 0);
 
        QObject::connect(&(this->serialPort), &QSerialPort::readyRead,
 
                         this, &MainWindow::onDataReady);
 
        ui->pbSkipByte->setEnabled(true);
 
    }
 
}
 

	
 
template<typename T> double MainWindow::readSampleAs()
 
{
 
    T data;
 
    this->serialPort.read((char*) &data, sizeof(data));
 
    return double(data);
 
}
 

	
 
bool MainWindow::isDemoRunning()
 
{
0 comments (0 inline, 0 general)