Work in progress.

merge-requests/1/head
Teuniz 2015-06-15 17:45:06 +02:00
rodzic 467ec042b7
commit 722f04b100
4 zmienionych plików z 46 dodań i 6 usunięć

Wyświetl plik

@ -31,7 +31,7 @@
#define PROGRAM_NAME "DSRemote"
#define PROGRAM_VERSION "0.11_1506141913"
#define PROGRAM_VERSION "0.11_1506151743"
#define MAX_PATHLEN 4096

Wyświetl plik

@ -2432,6 +2432,8 @@ void UI_Mainwindow::set_to_factory()
{
int i;
char str[256];
scrn_timer->stop();
tmcdev_write(device, "*RST");
@ -2506,6 +2508,18 @@ void UI_Mainwindow::set_to_factory()
sleep(10);
if(devparms.modelserie == 6)
{
for(i=0; i<MAX_CHNS; i++)
{
sprintf(str, ":CHAN%i:SCAL 1", i + 1);
tmcdev_write(device, str);
usleep(20000);
}
}
QApplication::restoreOverrideCursor();
scrn_timer->start(SCREEN_TIMER_IVAL);

Wyświetl plik

@ -397,6 +397,16 @@ void UI_Mainwindow::save_memory_waveform()
usleep(20000);
tmcdev_write(device, ":WAV:BEG");
usleep(20000);
tmcdev_write(device, ":WAV:STAT?");
usleep(20000);
tmcdev_read(device);
printf(":WAV:STAT? %s\n", device->buf);
}
usleep(20000);

Wyświetl plik

@ -562,7 +562,7 @@ void SignalCurve::setDeviceParameters(struct device_settings *devp)
void SignalCurve::drawTopLabels(QPainter *painter)
{
int i, x1;
int i, x1, tmp;
char str[128];
@ -702,24 +702,40 @@ void SignalCurve::drawTopLabels(QPainter *painter)
dtmp2 = (devparms->timebaseoffset - devparms->timebasedelayoffset) / ((devparms->hordivisions / 2) * devparms->timebasescale);
painter->fillRect(288, 16, (116 - (dtmp1 * 116)) - (dtmp2 * 116), 8, QColor(64, 160, 255));
tmp = (116 - (dtmp1 * 116)) - (dtmp2 * 116);
if(tmp > 0)
{
painter->fillRect(288, 16, tmp, 8, QColor(64, 160, 255));
}
x1 = (116 - (dtmp1 * 116)) + (dtmp2 * 116);
if(x1 > 0)
{
painter->fillRect(288 + 233 - x1, 16, x1, 8, QColor(64, 160, 255));
}
}
else if(devparms->memdepth > 1000)
{
dtmp1 = (devparms->hordivisions * devparms->timebasescale) / (devparms->memdepth / devparms->samplerate);
dtmp2 = devparms->timebaseoffset / dtmp1;
painter->fillRect(288, 16, (116 - (dtmp1 * 116)) - (dtmp2 * 116), 8, QColor(64, 160, 255));
tmp = (116 - (dtmp1 * 116)) - (dtmp2 * 116);
if(tmp > 0)
{
painter->fillRect(288, 16, tmp, 8, QColor(64, 160, 255));
}
x1 = (116 - (dtmp1 * 116)) + (dtmp2 * 116);
if(x1 > 0)
{
painter->fillRect(288 + 233 - x1, 16, x1, 8, QColor(64, 160, 255));
}
}
painter->drawRect(288, 16, 233, 8);