kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Bugfix.
rodzic
d77325054b
commit
a12c916407
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define PROGRAM_NAME "DSRemote"
|
#define PROGRAM_NAME "DSRemote"
|
||||||
#define PROGRAM_VERSION "0.32_1602081151"
|
#define PROGRAM_VERSION "0.32_1603121812"
|
||||||
|
|
||||||
#define MAX_PATHLEN 4096
|
#define MAX_PATHLEN 4096
|
||||||
|
|
||||||
|
|
|
@ -2452,6 +2452,8 @@ void UI_Mainwindow::chan_coupling_ac()
|
||||||
sprintf(str, ":CHAN%i:COUP AC", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:COUP AC", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2468,6 +2470,8 @@ void UI_Mainwindow::chan_coupling_dc()
|
||||||
sprintf(str, ":CHAN%i:COUP DC", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:COUP DC", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2484,6 +2488,8 @@ void UI_Mainwindow::chan_coupling_gnd()
|
||||||
sprintf(str, ":CHAN%i:COUP GND", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:COUP GND", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2500,6 +2506,8 @@ void UI_Mainwindow::chan_bwl_off()
|
||||||
sprintf(str, ":CHAN%i:BWL OFF", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:BWL OFF", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2516,6 +2524,8 @@ void UI_Mainwindow::chan_bwl_20()
|
||||||
sprintf(str, ":CHAN%i:BWL 20M", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:BWL 20M", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2532,6 +2542,48 @@ void UI_Mainwindow::chan_bwl_250()
|
||||||
sprintf(str, ":CHAN%i:BWL 250M", devparms.activechannel + 1);
|
sprintf(str, ":CHAN%i:BWL 250M", devparms.activechannel + 1);
|
||||||
|
|
||||||
set_cue_cmd(str);
|
set_cue_cmd(str);
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void UI_Mainwindow::updateLabels()
|
||||||
|
{
|
||||||
|
int chn;
|
||||||
|
|
||||||
|
char str[128];
|
||||||
|
|
||||||
|
for(chn=0; chn<devparms.channel_cnt; chn++)
|
||||||
|
{
|
||||||
|
str[0] = 0;
|
||||||
|
|
||||||
|
if(devparms.chancoupling[chn] == 2)
|
||||||
|
{
|
||||||
|
strcat(str, "AC");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(devparms.chanimpedance[chn])
|
||||||
|
{
|
||||||
|
strcat(str, " 50");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(devparms.chanbwlimit[chn])
|
||||||
|
{
|
||||||
|
strcat(str, " BW");
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(chn)
|
||||||
|
{
|
||||||
|
case 0: ch1InputLabel->setText(str);
|
||||||
|
break;
|
||||||
|
case 1: ch2InputLabel->setText(str);
|
||||||
|
break;
|
||||||
|
case 2: ch3InputLabel->setText(str);
|
||||||
|
break;
|
||||||
|
case 3: ch4InputLabel->setText(str);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1436,38 +1436,6 @@ int UI_Mainwindow::get_device_settings()
|
||||||
|
|
||||||
devparms.triggerholdoff = atof(device->buf);
|
devparms.triggerholdoff = atof(device->buf);
|
||||||
|
|
||||||
for(chn=0; chn<devparms.channel_cnt; chn++)
|
|
||||||
{
|
|
||||||
str[0] = 0;
|
|
||||||
|
|
||||||
if(devparms.chancoupling[chn] == 2)
|
|
||||||
{
|
|
||||||
strcat(str, "AC");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(devparms.chanimpedance[chn])
|
|
||||||
{
|
|
||||||
strcat(str, " 50");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(devparms.chanbwlimit[chn])
|
|
||||||
{
|
|
||||||
strcat(str, " BW");
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(chn)
|
|
||||||
{
|
|
||||||
case 0: ch1InputLabel->setText(str);
|
|
||||||
break;
|
|
||||||
case 1: ch2InputLabel->setText(str);
|
|
||||||
break;
|
|
||||||
case 2: ch3InputLabel->setText(str);
|
|
||||||
break;
|
|
||||||
case 3: ch4InputLabel->setText(str);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
usleep(TMC_GDS_DELAY);
|
usleep(TMC_GDS_DELAY);
|
||||||
|
|
||||||
if(tmc_write(":ACQ:SRAT?") != 10)
|
if(tmc_write(":ACQ:SRAT?") != 10)
|
||||||
|
@ -2038,6 +2006,8 @@ int UI_Mainwindow::get_device_settings()
|
||||||
devparms.fft_vscale = atof(device->buf);
|
devparms.fft_vscale = atof(device->buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateLabels();
|
||||||
|
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -433,6 +433,8 @@ private slots:
|
||||||
void select_fft_voffsetm4();
|
void select_fft_voffsetm4();
|
||||||
void set_fft_voffset();
|
void set_fft_voffset();
|
||||||
|
|
||||||
|
void updateLabels();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ void SignalCurve::drawWidget(QPainter *painter, int curve_w, int curve_h)
|
||||||
|
|
||||||
for(i=0; i<devparms->channel_cnt; i++)
|
for(i=0; i<devparms->channel_cnt; i++)
|
||||||
{
|
{
|
||||||
drawChanLabel(painter, 8 + (i * 125), curve_h - 25, i);
|
drawChanLabel(painter, 8 + (i * 130), curve_h - 25, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(devparms->connected && devparms->show_fps)
|
if(devparms->connected && devparms->show_fps)
|
||||||
|
@ -1230,6 +1230,11 @@ void SignalCurve::drawChanLabel(QPainter *painter, int xpos, int ypos, int chn)
|
||||||
|
|
||||||
strcat(str2, "V");
|
strcat(str2, "V");
|
||||||
|
|
||||||
|
if(devparms->chanbwlimit[chn])
|
||||||
|
{
|
||||||
|
strcat(str2, " B");
|
||||||
|
}
|
||||||
|
|
||||||
if(devparms->chandisplay[chn])
|
if(devparms->chandisplay[chn])
|
||||||
{
|
{
|
||||||
if(chn == devparms->activechannel)
|
if(chn == devparms->activechannel)
|
||||||
|
@ -1249,20 +1254,15 @@ void SignalCurve::drawChanLabel(QPainter *painter, int xpos, int ypos, int chn)
|
||||||
|
|
||||||
path = QPainterPath();
|
path = QPainterPath();
|
||||||
|
|
||||||
path.addRoundedRect(xpos + 25, ypos, 85, 20, 3, 3);
|
path.addRoundedRect(xpos + 25, ypos, 90, 20, 3, 3);
|
||||||
|
|
||||||
painter->fillPath(path, Qt::black);
|
painter->fillPath(path, Qt::black);
|
||||||
|
|
||||||
painter->setPen(SignalColor[chn]);
|
painter->setPen(SignalColor[chn]);
|
||||||
|
|
||||||
painter->drawRoundedRect(xpos + 25, ypos, 85, 20, 3, 3);
|
painter->drawRoundedRect(xpos + 25, ypos, 90, 20, 3, 3);
|
||||||
|
|
||||||
painter->drawText(xpos + 30, ypos + 1, 85, 20, Qt::AlignCenter, str2);
|
painter->drawText(xpos + 35, ypos + 1, 90, 20, Qt::AlignCenter, str2);
|
||||||
|
|
||||||
if(devparms->chanbwlimit[chn])
|
|
||||||
{
|
|
||||||
painter->drawText(xpos + 90, ypos + 1, 20, 20, Qt::AlignCenter, "B");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(devparms->chancoupling[chn] == 0)
|
if(devparms->chancoupling[chn] == 0)
|
||||||
{
|
{
|
||||||
|
@ -1308,12 +1308,7 @@ void SignalCurve::drawChanLabel(QPainter *painter, int xpos, int ypos, int chn)
|
||||||
painter->drawLine(xpos + 6, ypos + 3, xpos + 14, ypos + 3);
|
painter->drawLine(xpos + 6, ypos + 3, xpos + 14, ypos + 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->drawText(xpos + 30, ypos + 1, 85, 20, Qt::AlignCenter, str2);
|
painter->drawText(xpos + 35, ypos + 1, 90, 20, Qt::AlignCenter, str2);
|
||||||
|
|
||||||
if(devparms->chanbwlimit[chn])
|
|
||||||
{
|
|
||||||
painter->drawText(xpos + 90, ypos + 1, 20, 20, Qt::AlignCenter, "B");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(devparms->chancoupling[chn] == 0)
|
if(devparms->chancoupling[chn] == 0)
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue