kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Add menu entries to set the probe attenuation.
rodzic
3386340059
commit
fbfb34a2fc
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.34_1612291151"
|
||||
#define PROGRAM_VERSION "0.34_1612311049"
|
||||
|
||||
#define MAX_PATHLEN 4096
|
||||
|
||||
|
|
226
interface.cpp
226
interface.cpp
|
@ -2128,7 +2128,8 @@ void UI_Mainwindow::chan_menu()
|
|||
QMenu menu,
|
||||
submenubwl,
|
||||
submenucoupling,
|
||||
submenuinvert;
|
||||
submenuinvert,
|
||||
submenuprobe;
|
||||
|
||||
QList<QAction *> actionList;
|
||||
|
||||
|
@ -2187,6 +2188,29 @@ void UI_Mainwindow::chan_menu()
|
|||
}
|
||||
menu.addMenu(&submenubwl);
|
||||
|
||||
submenuprobe.setTitle("Probe");
|
||||
submenuprobe.addAction("0.1", this, SLOT(chan_probe_01()));
|
||||
if(devparms.modelserie != 6)
|
||||
{
|
||||
submenuprobe.addAction("0.2", this, SLOT(chan_probe_02()));
|
||||
submenuprobe.addAction("0.5", this, SLOT(chan_probe_05()));
|
||||
}
|
||||
submenuprobe.addAction("1", this, SLOT(chan_probe_1()));
|
||||
if(devparms.modelserie != 6)
|
||||
{
|
||||
submenuprobe.addAction("2", this, SLOT(chan_probe_2()));
|
||||
submenuprobe.addAction("5", this, SLOT(chan_probe_5()));
|
||||
}
|
||||
submenuprobe.addAction("10", this, SLOT(chan_probe_10()));
|
||||
if(devparms.modelserie != 6)
|
||||
{
|
||||
submenuprobe.addAction("20", this, SLOT(chan_probe_20()));
|
||||
submenuprobe.addAction("50", this, SLOT(chan_probe_50()));
|
||||
}
|
||||
submenuprobe.addAction("100", this, SLOT(chan_probe_100()));
|
||||
actionList = submenuprobe.actions();
|
||||
menu.addMenu(&submenuprobe);
|
||||
|
||||
submenuinvert.setTitle("Invert");
|
||||
submenuinvert.addAction("On", this, SLOT(chan_invert_on()));
|
||||
submenuinvert.addAction("Off", this, SLOT(chan_invert_off()));
|
||||
|
@ -2510,6 +2534,206 @@ void UI_Mainwindow::chan_coupling_gnd()
|
|||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_01()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 0.1;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 0.1X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_02()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 0.2;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 0.2X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_05()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 0.5;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 0.5X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_1()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 1;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 1X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_2()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 2;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 2X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_5()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 5;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 5X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_10()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 10;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 10X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_20()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 20;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 20X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_50()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 50;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 50X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_probe_100()
|
||||
{
|
||||
char str[128];
|
||||
|
||||
devparms.chanscale[devparms.activechannel] /= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
devparms.chanprobe[devparms.activechannel] = 100;
|
||||
|
||||
devparms.chanscale[devparms.activechannel] *= devparms.chanprobe[devparms.activechannel];
|
||||
|
||||
sprintf(str, "Channel %i probe: 100X", devparms.activechannel + 1);
|
||||
|
||||
statusLabel->setText(str);
|
||||
|
||||
sprintf(str, ":CHAN%i:PROB %e", devparms.activechannel + 1, devparms.chanprobe[devparms.activechannel]);
|
||||
|
||||
set_cue_cmd(str);
|
||||
}
|
||||
|
||||
|
||||
void UI_Mainwindow::chan_bwl_off()
|
||||
{
|
||||
char str[128];
|
||||
|
|
10
mainwindow.h
10
mainwindow.h
|
@ -361,6 +361,16 @@ private slots:
|
|||
void chan_bwl_250();
|
||||
void chan_invert_on();
|
||||
void chan_invert_off();
|
||||
void chan_probe_01();
|
||||
void chan_probe_02();
|
||||
void chan_probe_05();
|
||||
void chan_probe_1();
|
||||
void chan_probe_2();
|
||||
void chan_probe_5();
|
||||
void chan_probe_10();
|
||||
void chan_probe_20();
|
||||
void chan_probe_50();
|
||||
void chan_probe_100();
|
||||
|
||||
void chan_menu();
|
||||
void math_menu();
|
||||
|
|
Ładowanie…
Reference in New Issue