• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision32b3c4ac97776b5fd651161cf615cb7638541f1e (tree)
Zeit2013-12-11 00:15:01
Autoralucky4416 <alucky4416@user...>
Commiteralucky4416

Log Message

CHG: daqmx error handling when dio_init().

Ändern Zusammenfassung

Diff

--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -28,11 +28,15 @@ MainWindow::~MainWindow()
2828
2929 void MainWindow::slot_dio_ready(int status)
3030 {
31- qDebug() << "DIO Ready.";
32- ui->statusBar->showMessage("Idle...");
33- ui->pushButton_Init->setEnabled(true);
34- ui->pushButton_Clear->setEnabled(true);
35- ui->pushButton_Enter->setEnabled(true);
31+ if (status) {
32+ ui->statusBar->showMessage("Device Error!");
33+ } else {
34+ qDebug() << "DIO Ready.";
35+ ui->statusBar->showMessage("Idle...");
36+ ui->pushButton_Init->setEnabled(true);
37+ ui->pushButton_Clear->setEnabled(true);
38+ ui->pushButton_Enter->setEnabled(true);
39+ }
3640 }
3741
3842 void MainWindow::on_pushButton_Init_clicked()
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -51,7 +51,7 @@
5151 <rect>
5252 <x>20</x>
5353 <y>10</y>
54- <width>161</width>
54+ <width>191</width>
5555 <height>16</height>
5656 </rect>
5757 </property>
--- a/thlcdoutput.cpp
+++ b/thlcdoutput.cpp
@@ -266,6 +266,9 @@ void ThLCDOutput::run()
266266
267267 err = dio_init();
268268 emit notify_dio_ready(err);
269+ if (err) {
270+ goto Error;
271+ }
269272
270273 lcd_init();
271274
@@ -297,6 +300,8 @@ void ThLCDOutput::run()
297300 }
298301
299302 dio_final();
303+Error:
304+ ;
300305 }
301306 void ThLCDOutput::sendEvent_Init()
302307 {