kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Minor improvement.
rodzic
0329e08a74
commit
551f0eb2db
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.32_1610091750"
|
||||
#define PROGRAM_VERSION "0.32_1610091854"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
|
@ -2283,12 +2283,8 @@ void UI_Mainwindow::set_to_factory()
|
|||
|
||||
scrn_thread->wait();
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
tmc_write("*RST");
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
devparms.timebasescale = 1e-6;
|
||||
|
||||
devparms.timebaseoffset = 0;
|
||||
|
@ -2355,25 +2351,19 @@ void UI_Mainwindow::set_to_factory()
|
|||
|
||||
waveForm->update();
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Restoring the instrument to the default state.\n"
|
||||
"Please wait...");
|
||||
|
||||
qApp->processEvents();
|
||||
QTimer t_rst_1;
|
||||
t_rst_1.setSingleShot(true);
|
||||
#if QT_VERSION >= 0x050000
|
||||
t_rst_1.setTimerType(Qt::PreciseTimer);
|
||||
#endif
|
||||
connect(&t_rst_1, SIGNAL(timeout()), &msgBox, SLOT(accept()));
|
||||
t_rst_1.start(9000);
|
||||
|
||||
for(i=0; i<50; i++)
|
||||
{
|
||||
qApp->processEvents();
|
||||
|
||||
usleep(500000);
|
||||
|
||||
tmc_write("*OPC?");
|
||||
|
||||
tmc_read();
|
||||
|
||||
if(device->buf[0] == '1')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
msgBox.exec();
|
||||
|
||||
if(devparms.modelserie == 6)
|
||||
{
|
||||
|
@ -2387,8 +2377,6 @@ void UI_Mainwindow::set_to_factory()
|
|||
}
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
scrn_timer->start(devparms.screentimerival);
|
||||
}
|
||||
|
||||
|
|
|
@ -147,6 +147,8 @@ int tmcdev_write(struct tmcdev *dev, const char *cmd)
|
|||
printf("tmc_dev write: %s", buf);
|
||||
}
|
||||
|
||||
if(!strncmp(buf, "*RST", 4)) qry = 1;
|
||||
|
||||
n = write(dev->fd, buf, strlen(buf));
|
||||
|
||||
if(n != (len + 1))
|
||||
|
|
Ładowanie…
Reference in New Issue