A first Try on Serial.

This commit is contained in:
Hiro Protagonist 2017-03-30 19:48:01 +13:00
parent 7964cc0921
commit 0a07cf3745
2 changed files with 3 additions and 3 deletions

View file

@ -427,15 +427,15 @@ void MainWindow::frameSaved( FlyCapture2::Image * image ) {
}
ui->buffer->display( image_buffer->length() );
comm.sendBuffer( image_buffer->length() );
if ( status == STOPPING && image_buffer->empty() )
startStopRecording();
comm.sendBuffer( image_buffer->length() );
m.unlock();
}
void MainWindow::setLcd() {
qDebug() << "setting lcd";
ui->framesCaptured->display( recorder.frameNumber() );
ui->timeCaptured->display( QString( "%1:%2" ).arg( ( ( ( int )recorder.timeCaptured() ) / 60 ) ).arg( ( int )recorder.timeCaptured() % 60 ) );
}

View file

@ -39,7 +39,7 @@ class SerialCommunicator : public QObject {
void sendBuffer( int buff ) {
if ( lastBuff != buff )
write( QByteArray( "B" ) + QString::number( buff ).toUtf8() );
write( QByteArray( "B:" ) + QString::number( buff ).toUtf8() );
}
private: