Implement the Record & Playback function also for the DS6000 series.

merge-requests/1/head
Teuniz 2017-05-15 11:52:36 +02:00
rodzic a1ad8bdfb5
commit 7b3102701c
4 zmienionych plików z 85 dodań i 9 usunięć

Wyświetl plik

@ -35,7 +35,7 @@
#define PROGRAM_NAME "DSRemote"
#define PROGRAM_VERSION "0.35_1705141924"
#define PROGRAM_VERSION "0.35_1705151151"
#define MAX_PATHLEN 4096

Wyświetl plik

@ -1874,6 +1874,13 @@ void UI_Mainwindow::playpauseButtonClicked()
}
else
{
if((devparms.modelserie == 6) && (devparms.func_wrec_enable == 1)) // DS6000 series record mode
{
set_cue_cmd(":FUNC:WRM PLAY");
devparms.func_wrec_enable = 2; // DS6000 series play mode
}
devparms.func_wplay_operate = 1;
devparms.func_wplay_fcur = 0;
@ -1913,6 +1920,13 @@ void UI_Mainwindow::recordButtonClicked()
if(devparms.func_wrec_operate) return;
if(devparms.func_wrec_enable == 2) // DS6000 series play mode
{
set_cue_cmd(":FUNC:WRM REC");
devparms.func_wrec_enable = 1; // DS6000 series record mode
}
statusLabel->setText("Record on");
if(devparms.modelserie == 6)

Wyświetl plik

@ -38,11 +38,19 @@ UI_playback_window::UI_playback_window(QWidget *w_parent)
mainwindow->set_cue_cmd(":FUNC:WREC:FMAX?", rec_fmax_resp);
mainwindow->set_cue_cmd(":FUNC:WREC:FEND?", rec_fend_resp);
mainwindow->set_cue_cmd(":FUNC:WREC:FINT?", rec_fint_resp);
if(devparms->modelserie != 6)
{
mainwindow->set_cue_cmd(":FUNC:WREC:FINT?", rec_fint_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:FINT?", rep_fint_resp);
}
else
{
mainwindow->set_cue_cmd(":FUNC:WREC:INT?", rec_fint_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:INT?", rep_fint_resp);
}
mainwindow->set_cue_cmd(":FUNC:WREP:FST?", rep_fstart_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:FEND?", rep_fend_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:FMAX?", rep_fmax_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:FINT?", rep_fint_resp);
setWindowTitle("Record/Playback");
@ -113,13 +121,13 @@ UI_playback_window::UI_playback_window(QWidget *w_parent)
toggle_playback_button = new QPushButton(this);
toggle_playback_button->setGeometry(20, 255, 100, 25);
if(devparms->func_wrec_enable == 1)
if(!devparms->func_wrec_enable)
{
toggle_playback_button->setText("Disable");
toggle_playback_button->setText("Enable");
}
else
{
toggle_playback_button->setText("Enable");
toggle_playback_button->setText("Disable");
}
toggle_playback_button->setAutoDefault(false);
toggle_playback_button->setDefault(false);
@ -196,7 +204,7 @@ void UI_playback_window::toggle_playback()
QMessageBox msgBox;
msgBox.setText("Timebase scale must be <= 100mS.");
if(devparms->func_wrec_enable == 0)
if(!devparms->func_wrec_enable)
{
if(devparms->timebasedelayenable)
{
@ -229,6 +237,10 @@ void UI_playback_window::toggle_playback()
{
mainwindow->set_cue_cmd(":FUNC:WREC:ENAB ON");
}
else
{
mainwindow->set_cue_cmd(":FUNC:WRM REC");
}
}
else
{
@ -254,6 +266,10 @@ void UI_playback_window::toggle_playback()
{
mainwindow->set_cue_cmd(":FUNC:WREC:ENAB OFF");
}
else
{
mainwindow->set_cue_cmd(":FUNC:WRM OFF");
}
}
}
@ -282,7 +298,14 @@ void UI_playback_window::rec_fint_spinbox_changed(double fint)
strcat(str, "S");
sprintf(str, ":FUNC:WREC:FINT %e", fint);
if(devparms->modelserie != 6)
{
sprintf(str, ":FUNC:WREC:FINT %e", fint);
}
else
{
sprintf(str, ":FUNC:WREC:INT %e", fint);
}
mainwindow->set_cue_cmd(str);
}
@ -328,7 +351,14 @@ void UI_playback_window::rep_fint_spinbox_changed(double fint)
mainwindow->statusLabel->setText(str);
sprintf(str, ":FUNC:WREP:FINT %e", fint);
if(devparms->modelserie != 6)
{
sprintf(str, ":FUNC:WREP:FINT %e", fint);
}
else
{
sprintf(str, ":FUNC:WREP:INT %e", fint);
}
mainwindow->set_cue_cmd(str);
}

Wyświetl plik

@ -2618,6 +2618,38 @@ void read_settings_thread::run()
goto GDS_OUT_ERROR;
}
}
else
{
if(tmc_write(":FUNC:WRM?") != 10)
{
line = __LINE__;
goto GDS_OUT_ERROR;
}
if(tmc_read() < 1)
{
line = __LINE__;
goto GDS_OUT_ERROR;
}
if(!strcmp(device->buf, "REC"))
{
devparms->func_wrec_enable = 1;
}
else if(!strcmp(device->buf, "PLAY"))
{
devparms->func_wrec_enable = 2;
}
else if(!strcmp(device->buf, "OFF"))
{
devparms->func_wrec_enable = 0;
}
else
{
line = __LINE__;
goto GDS_OUT_ERROR;
}
}
if(devparms->func_wrec_enable)
{