diff --git a/global.h b/global.h index e66e669..acfc055 100644 --- a/global.h +++ b/global.h @@ -35,7 +35,7 @@ #define PROGRAM_NAME "DSRemote" -#define PROGRAM_VERSION "0.35_1705141924" +#define PROGRAM_VERSION "0.35_1705151151" #define MAX_PATHLEN 4096 diff --git a/interface.cpp b/interface.cpp index 1e6ddf7..6d6a093 100644 --- a/interface.cpp +++ b/interface.cpp @@ -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) diff --git a/playback_dialog.cpp b/playback_dialog.cpp index a4fb711..ef4e90b 100644 --- a/playback_dialog.cpp +++ b/playback_dialog.cpp @@ -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); } diff --git a/read_settings_thread.cpp b/read_settings_thread.cpp index 6059691..82e14dd 100644 --- a/read_settings_thread.cpp +++ b/read_settings_thread.cpp @@ -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) {