diff options
Diffstat (limited to 'clients/tde/src/part/fpgaview/part.cpp')
-rw-r--r-- | clients/tde/src/part/fpgaview/part.cpp | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/clients/tde/src/part/fpgaview/part.cpp b/clients/tde/src/part/fpgaview/part.cpp index 769a7f9..2e73c43 100644 --- a/clients/tde/src/part/fpgaview/part.cpp +++ b/clients/tde/src/part/fpgaview/part.cpp @@ -564,7 +564,7 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj : RemoteInstrumentPart( parent, name ), m_socket(0), m_base(0), connToServerConnecting(false), connToServerState(-1), connToServerTimeoutTimer(NULL), m_interfaceMode(BasicInterfaceMode), m_commHandlerState(0), m_connectionActiveAndValid(false), m_tickerState(0), m_remoteInputModeEnabled(false), m_4bitInputValue(0), m_4bitOutputValue(0), m_8bitInputValue(0), m_8bitOutputValue(0), m_16bitInputValue(0), m_16bitOutputValue(0), m_7segDigit3OutputValue(0xffffffff), m_7segDigit2OutputValue(0xffffffff), m_7segDigit1OutputValue(0xffffffff), m_7segDigit0OutputValue(0xffffffff), - m_batchOutputFile(NULL) + m_batchOutputFile(NULL), m_dataOutputFile(NULL) { // Initialize mutex m_connectionMutex = new TQMutex(false); @@ -691,7 +691,13 @@ FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObj m_base->frameLEDDisplay->setFrameStyle(TQFrame::Box | TQFrame::Raised); #endif + m_base->frameLCDDisplay->setBackgroundColor(TQColor(192, 192, 192)); + m_base->LCDOutputLabel->setBackgroundColor(TQColor(192, 192, 192)); + m_base->LCDOutputLabel->setPaletteForegroundColor(TQColor(0, 0, 0)); + m_base->frameLCDDisplay->setFrameStyle(TQFrame::Box | TQFrame::Raised); + connect(m_base->batchTestRunButton, SIGNAL(clicked()), this, SLOT(batchTestRunButtonClicked())); + connect(m_base->dataProcessingRunButton, SIGNAL(clicked()), this, SLOT(dataProcessingRunButtonClicked())); processAllGraphicsUpdates(); @@ -862,22 +868,48 @@ void FPGAViewPart::processLockouts() { m_modeAdvancedEnabled->setChecked(true); } - if ((m_base->batchTestInputFile->url() != "") && (m_base->batchTestOutputFile->url() != "") && (m_commHandlerMode != 1) && (m_connectionActiveAndValid == true)) { + if ((m_base->batchTestInputFile->url() != "") && (m_base->batchTestOutputFile->url() != "") && (m_commHandlerMode == 0) && (m_connectionActiveAndValid == true)) { m_base->batchTestRunButton->setEnabled(true); - m_base->batchTest16BitCheckBox->setEnabled(true); } else { m_base->batchTestRunButton->setEnabled(false); - m_base->batchTest16BitCheckBox->setEnabled(false); } if (m_commHandlerMode == 1) { m_base->batchTestInputFile->setEnabled(false); m_base->batchTestOutputFile->setEnabled(false); + m_base->batchTest16BitCheckBox->setEnabled(false); } else { m_base->batchTestInputFile->setEnabled(true); m_base->batchTestOutputFile->setEnabled(true); + m_base->batchTest16BitCheckBox->setEnabled(true); + } + + if ((m_connectionActiveAndValid == true) && (m_commHandlerMode == 0)) { + m_base->batchTestStatusLabel->setText(i18n("Ready")); + } + + if ((m_base->dataProcessingInputFile->url() != "") && (m_base->dataProcessingOutputFile->url() != "") && (m_commHandlerMode == 0) && (m_connectionActiveAndValid == true)) { + m_base->dataProcessingRunButton->setEnabled(true); + } + else { + m_base->dataProcessingRunButton->setEnabled(false); + } + + if (m_commHandlerMode == 2) { + m_base->dataProcessingInputFile->setEnabled(false); + m_base->dataProcessingOutputFile->setEnabled(false); + m_base->dataProcessingGenerateValidationString->setEnabled(false); + } + else { + m_base->dataProcessingInputFile->setEnabled(true); + m_base->dataProcessingOutputFile->setEnabled(true); + m_base->dataProcessingGenerateValidationString->setEnabled(true); + } + + if ((m_connectionActiveAndValid == true) && (m_commHandlerMode == 0)) { + m_base->dataProcessingStatusLabel->setText(i18n("Ready")); } } @@ -1076,6 +1108,13 @@ void FPGAViewPart::batchTestRunButtonClicked() { processLockouts(); } +void FPGAViewPart::dataProcessingRunButtonClicked() { + m_commHandlerState = 0; + m_commHandlerMode = 2; + m_dataGenerateValidationString = m_base->dataProcessingGenerateValidationString->isChecked(); + processLockouts(); +} + void FPGAViewPart::sendInputStatesToRemoteFPGA() { if (m_socket) { char data[64]; @@ -1231,6 +1270,7 @@ void FPGAViewPart::updateDisplay() { // Batch test mode // This expects to see a newline-delimited text file containing input values to test if (m_commHandlerState == 0) { + m_base->batchTestStatusLabel->setText(i18n("Reading input data") + "..."); m_batchInputValueList.clear(); TQFile file(m_base->batchTestInputFile->url()); if (file.open(IO_ReadOnly)) { @@ -1274,6 +1314,7 @@ void FPGAViewPart::updateDisplay() { processLockouts(); } else { + m_base->batchTestStatusLabel->setText(i18n("Processing element") + " " + TQString("%1/%2").arg(m_batchCurrentValueIndex).arg(m_batchInputValueList.count()) + "..."); if (m_batchUsing16Bit) { m_16bitInputValue = m_batchInputValueList[m_batchCurrentValueIndex]; } |