Merge pull request #20 from momu/mso4000-support

Add rudimentary support for MSO4000 series
merge-requests/1/head
Teuniz 2017-10-15 16:16:53 +02:00 zatwierdzone przez GitHub
commit 07b9811cb1
6 zmienionych plików z 109 dodań i 79 usunięć

Wyświetl plik

@ -31,5 +31,17 @@ Now you can run the program by typing: dsremote
Read also the file readme_usbtcm_driver.txt Read also the file readme_usbtcm_driver.txt
and the file notes.txt. and the file notes.txt.
Supported devices
---------------
DS6000 and DS1000Z series oscilloscopes.
### MSO4000/DS4000 series
There is some basic support like capturing screenshots.
Not tested yet:
* Record & Playback function
* Wave Inspector
* serial decoding.

Wyświetl plik

@ -77,7 +77,7 @@ UI_decoder_window::UI_decoder_window(QWidget *w_parent)
threshold_auto_combobox->setGeometry(510, 42, 140, 25); threshold_auto_combobox->setGeometry(510, 42, 140, 25);
threshold_auto_combobox->addItem("Manual threshold"); threshold_auto_combobox->addItem("Manual threshold");
threshold_auto_combobox->addItem("Auto threshold"); threshold_auto_combobox->addItem("Auto threshold");
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold_auto = 0; devparms->math_decode_threshold_auto = 0;
threshold_auto_combobox->setCurrentIndex(0); threshold_auto_combobox->setCurrentIndex(0);
@ -210,7 +210,7 @@ UI_decoder_window::UI_decoder_window(QWidget *w_parent)
spi_timeout_dspinbox->setGeometry(110, 230, 120, 25); spi_timeout_dspinbox->setGeometry(110, 230, 120, 25);
spi_timeout_dspinbox->setSuffix(" Sec."); spi_timeout_dspinbox->setSuffix(" Sec.");
spi_timeout_dspinbox->setDecimals(7); spi_timeout_dspinbox->setDecimals(7);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
spi_timeout_dspinbox->setValue(0.0); spi_timeout_dspinbox->setValue(0.0);
spi_timeout_dspinbox->setEnabled(false); spi_timeout_dspinbox->setEnabled(false);
@ -267,7 +267,7 @@ UI_decoder_window::UI_decoder_window(QWidget *w_parent)
trace_pos_spinbox = new QSpinBox(this); trace_pos_spinbox = new QSpinBox(this);
trace_pos_spinbox->setGeometry(370, 392, 100, 25); trace_pos_spinbox->setGeometry(370, 392, 100, 25);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
trace_pos_spinbox->setRange(-163, 143); trace_pos_spinbox->setRange(-163, 143);
} }
@ -449,7 +449,7 @@ void UI_decoder_window::uart_polarity_combobox_clicked(int idx)
{ {
devparms->math_decode_uart_pol = idx; devparms->math_decode_uart_pol = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -478,7 +478,7 @@ void UI_decoder_window::uart_endian_combobox_clicked(int idx)
{ {
devparms->math_decode_uart_end = idx; devparms->math_decode_uart_end = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -509,7 +509,7 @@ void UI_decoder_window::uart_baud_spinbox_changed()
devparms->math_decode_uart_baud = uart_baud_spinbox->value(); devparms->math_decode_uart_baud = uart_baud_spinbox->value();
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:RS232:BAUD %i", devparms->math_decode_uart_baud); sprintf(str, ":BUS1:RS232:BAUD %i", devparms->math_decode_uart_baud);
} }
@ -530,7 +530,7 @@ void UI_decoder_window::uart_width_combobox_clicked(int idx)
devparms->math_decode_uart_width = idx; devparms->math_decode_uart_width = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:RS232:DBIT %i", idx); sprintf(str, ":BUS1:RS232:DBIT %i", idx);
} }
@ -547,7 +547,7 @@ void UI_decoder_window::uart_stop_combobox_clicked(int idx)
{ {
devparms->math_decode_uart_stop = idx; devparms->math_decode_uart_stop = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -584,7 +584,7 @@ void UI_decoder_window::uart_parity_combobox_clicked(int idx)
{ {
devparms->math_decode_uart_par = idx; devparms->math_decode_uart_par = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -623,7 +623,7 @@ void UI_decoder_window::spi_width_spinbox_changed()
devparms->math_decode_spi_width = spi_width_spinbox->value(); devparms->math_decode_spi_width = spi_width_spinbox->value();
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:SPI:DBIT %i", devparms->math_decode_spi_width); sprintf(str, ":BUS1:SPI:DBIT %i", devparms->math_decode_spi_width);
} }
@ -642,7 +642,7 @@ void UI_decoder_window::spi_timeout_dspinbox_changed()
devparms->math_decode_spi_timeout = spi_timeout_dspinbox->value(); devparms->math_decode_spi_timeout = spi_timeout_dspinbox->value();
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
sprintf(str, ":DEC1:SPI:TIM %e", devparms->math_decode_spi_timeout); sprintf(str, ":DEC1:SPI:TIM %e", devparms->math_decode_spi_timeout);
@ -657,7 +657,7 @@ void UI_decoder_window::trace_pos_spinbox_changed()
devparms->math_decode_pos = trace_pos_spinbox->value(); devparms->math_decode_pos = trace_pos_spinbox->value();
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(devparms->math_decode_mode == DECODE_MODE_SPI) if(devparms->math_decode_mode == DECODE_MODE_SPI)
{ {
@ -689,7 +689,7 @@ void UI_decoder_window::spi_select_combobox_clicked(int idx)
{ {
devparms->math_decode_spi_select = idx; devparms->math_decode_spi_select = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -720,7 +720,7 @@ void UI_decoder_window::spi_mode_combobox_clicked(int idx)
devparms->math_decode_spi_mode = idx; devparms->math_decode_spi_mode = idx;
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -749,7 +749,7 @@ void UI_decoder_window::spi_polarity_combobox_clicked(int idx)
{ {
devparms->math_decode_spi_pol = idx; devparms->math_decode_spi_pol = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -780,7 +780,7 @@ void UI_decoder_window::spi_edge_combobox_clicked(int idx)
{ {
devparms->math_decode_spi_edge = idx; devparms->math_decode_spi_edge = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -809,7 +809,7 @@ void UI_decoder_window::spi_endian_combobox_clicked(int idx)
{ {
devparms->math_decode_spi_end = idx; devparms->math_decode_spi_end = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -838,7 +838,7 @@ void UI_decoder_window::format_combobox_clicked(int idx)
{ {
devparms->math_decode_format = idx; devparms->math_decode_format = idx;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == 0) if(idx == 0)
{ {
@ -889,7 +889,7 @@ void UI_decoder_window::tabholder_index_changed(int idx)
threshold_auto_clicked(devparms->math_decode_threshold_auto); threshold_auto_clicked(devparms->math_decode_threshold_auto);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(idx == DECODE_MODE_TAB_PAR) if(idx == DECODE_MODE_TAB_PAR)
{ {
@ -936,7 +936,7 @@ void UI_decoder_window::threshold_1_dspinbox_changed()
if(tabholder->currentIndex() == DECODE_MODE_TAB_UART) if(tabholder->currentIndex() == DECODE_MODE_TAB_UART)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold_uart_tx = threshold_1_dspinbox->value(); devparms->math_decode_threshold_uart_tx = threshold_1_dspinbox->value();
@ -956,7 +956,7 @@ void UI_decoder_window::threshold_1_dspinbox_changed()
} }
else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI) else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold[2] = threshold_1_dspinbox->value(); devparms->math_decode_threshold[2] = threshold_1_dspinbox->value();
@ -985,7 +985,7 @@ void UI_decoder_window::threshold_2_dspinbox_changed()
if(tabholder->currentIndex() == DECODE_MODE_TAB_UART) if(tabholder->currentIndex() == DECODE_MODE_TAB_UART)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold_uart_rx = threshold_2_dspinbox->value(); devparms->math_decode_threshold_uart_rx = threshold_2_dspinbox->value();
@ -1005,7 +1005,7 @@ void UI_decoder_window::threshold_2_dspinbox_changed()
} }
else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI) else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold[1] = threshold_2_dspinbox->value(); devparms->math_decode_threshold[1] = threshold_2_dspinbox->value();
@ -1037,7 +1037,7 @@ void UI_decoder_window::threshold_3_dspinbox_changed()
} }
else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI) else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold[0] = threshold_3_dspinbox->value(); devparms->math_decode_threshold[0] = threshold_3_dspinbox->value();
@ -1069,7 +1069,7 @@ void UI_decoder_window::threshold_4_dspinbox_changed()
} }
else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI) else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
devparms->math_decode_threshold[3] = threshold_4_dspinbox->value(); devparms->math_decode_threshold[3] = threshold_4_dspinbox->value();
@ -1113,7 +1113,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
devparms->math_decode_threshold_auto = thr_auto; devparms->math_decode_threshold_auto = thr_auto;
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
if(thr_auto == 0) if(thr_auto == 0)
{ {
@ -1129,7 +1129,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
{ {
if(uart_tx_src_combobox->currentIndex() > 0) if(uart_tx_src_combobox->currentIndex() > 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:RS232:TX CHAN%i", uart_tx_src_combobox->currentIndex()); sprintf(str, ":BUS1:RS232:TX CHAN%i", uart_tx_src_combobox->currentIndex());
@ -1144,7 +1144,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:RS232:TX OFF"); mainwindow->set_cue_cmd(":BUS1:RS232:TX OFF");
} }
@ -1156,7 +1156,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
if(uart_rx_src_combobox->currentIndex() > 0) if(uart_rx_src_combobox->currentIndex() > 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:RS232:RX CHAN%i", uart_rx_src_combobox->currentIndex()); sprintf(str, ":BUS1:RS232:RX CHAN%i", uart_rx_src_combobox->currentIndex());
@ -1171,7 +1171,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:RS232:RX OFF"); mainwindow->set_cue_cmd(":BUS1:RS232:RX OFF");
} }
@ -1186,7 +1186,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
threshold_1_dspinbox->setEnabled(true); threshold_1_dspinbox->setEnabled(true);
threshold_2_dspinbox->setEnabled(true); threshold_2_dspinbox->setEnabled(true);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
threshold_1_dspinbox->setValue(devparms->math_decode_threshold_uart_tx); threshold_1_dspinbox->setValue(devparms->math_decode_threshold_uart_tx);
threshold_2_dspinbox->setValue(devparms->math_decode_threshold_uart_rx); threshold_2_dspinbox->setValue(devparms->math_decode_threshold_uart_rx);
@ -1218,7 +1218,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI) else if(tabholder->currentIndex() == DECODE_MODE_TAB_SPI)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:SPI:SCLK:SOUR CHAN%i", spi_clk_src_combobox->currentIndex() + 1); sprintf(str, ":BUS1:SPI:SCLK:SOUR CHAN%i", spi_clk_src_combobox->currentIndex() + 1);
@ -1233,7 +1233,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
if(spi_mosi_src_combobox->currentIndex() > 0) if(spi_mosi_src_combobox->currentIndex() > 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:SPI:MOSI:SOUR CHAN%i", spi_mosi_src_combobox->currentIndex()); sprintf(str, ":BUS1:SPI:MOSI:SOUR CHAN%i", spi_mosi_src_combobox->currentIndex());
@ -1248,7 +1248,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:SPI:MOSI:SOUR OFF"); mainwindow->set_cue_cmd(":BUS1:SPI:MOSI:SOUR OFF");
} }
@ -1260,7 +1260,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
if(spi_miso_src_combobox->currentIndex() > 0) if(spi_miso_src_combobox->currentIndex() > 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:SPI:MISO:SOUR CHAN%i", spi_miso_src_combobox->currentIndex()); sprintf(str, ":BUS1:SPI:MISO:SOUR CHAN%i", spi_miso_src_combobox->currentIndex());
@ -1275,7 +1275,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:SPI:MISO:SOUR OFF"); mainwindow->set_cue_cmd(":BUS1:SPI:MISO:SOUR OFF");
} }
@ -1285,7 +1285,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
} }
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
if(spi_mode_combobox->currentIndex() == 0) if(spi_mode_combobox->currentIndex() == 0)
{ {
@ -1299,7 +1299,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
if(spi_cs_src_combobox->currentIndex() > 0) if(spi_cs_src_combobox->currentIndex() > 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
sprintf(str, ":BUS1:SPI:SS:SOUR CHAN%i", spi_cs_src_combobox->currentIndex()); sprintf(str, ":BUS1:SPI:SS:SOUR CHAN%i", spi_cs_src_combobox->currentIndex());
@ -1317,7 +1317,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:SPI:SS:SOUR OFF"); mainwindow->set_cue_cmd(":BUS1:SPI:SS:SOUR OFF");
} }
@ -1325,7 +1325,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
if(spi_select_combobox->currentIndex() == 0) if(spi_select_combobox->currentIndex() == 0)
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:SPI:SS:POL NEG"); mainwindow->set_cue_cmd(":BUS1:SPI:SS:POL NEG");
} }
@ -1339,7 +1339,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
} }
else else
{ {
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:SPI:SS:POL POS"); mainwindow->set_cue_cmd(":BUS1:SPI:SS:POL POS");
} }
@ -1356,7 +1356,7 @@ void UI_decoder_window::threshold_auto_clicked(int thr_auto)
threshold_3_dspinbox->setEnabled(true); threshold_3_dspinbox->setEnabled(true);
threshold_4_dspinbox->setEnabled(true); threshold_4_dspinbox->setEnabled(true);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
threshold_1_dspinbox->setValue(devparms->math_decode_threshold[2]); threshold_1_dspinbox->setValue(devparms->math_decode_threshold[2]);
threshold_2_dspinbox->setValue(devparms->math_decode_threshold[1]); threshold_2_dspinbox->setValue(devparms->math_decode_threshold[1]);
@ -1403,7 +1403,7 @@ void UI_decoder_window::toggle_decode()
{ {
devparms->math_decode_display = 0; devparms->math_decode_display = 0;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:DISP OFF"); mainwindow->set_cue_cmd(":BUS1:DISP OFF");
} }
@ -1420,7 +1420,7 @@ void UI_decoder_window::toggle_decode()
{ {
devparms->math_decode_display = 1; devparms->math_decode_display = 1;
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
mainwindow->set_cue_cmd(":BUS1:DISP ON"); mainwindow->set_cue_cmd(":BUS1:DISP ON");
} }

Wyświetl plik

@ -987,6 +987,24 @@ void UI_Mainwindow::get_device_model(const char *str)
devparms.modelserie = 4; devparms.modelserie = 4;
} }
if(!strcmp(str, "MSO4012"))
{
devparms.channel_cnt = 2;
devparms.bandwidth = 100;
devparms.modelserie = 4;
}
if(!strcmp(str, "MSO4024"))
{
devparms.channel_cnt = 4;
devparms.bandwidth = 200;
devparms.modelserie = 4;
}
if(!strcmp(str, "DS2072A")) if(!strcmp(str, "DS2072A"))
{ {

Wyświetl plik

@ -38,7 +38,7 @@ 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:FMAX?", rec_fmax_resp);
mainwindow->set_cue_cmd(":FUNC:WREC:FEND?", rec_fend_resp); mainwindow->set_cue_cmd(":FUNC:WREC:FEND?", rec_fend_resp);
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
mainwindow->set_cue_cmd(":FUNC:WREC:FINT?", rec_fint_resp); mainwindow->set_cue_cmd(":FUNC:WREC:FINT?", rec_fint_resp);
mainwindow->set_cue_cmd(":FUNC:WREP:FINT?", rep_fint_resp); mainwindow->set_cue_cmd(":FUNC:WREP:FINT?", rep_fint_resp);
@ -262,7 +262,7 @@ void UI_playback_window::toggle_playback()
toggle_playback_button->setText("Enable"); toggle_playback_button->setText("Enable");
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
mainwindow->set_cue_cmd(":FUNC:WREC:ENAB OFF"); mainwindow->set_cue_cmd(":FUNC:WREC:ENAB OFF");
} }
@ -298,7 +298,7 @@ void UI_playback_window::rec_fint_spinbox_changed(double fint)
strcat(str, "S"); strcat(str, "S");
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
sprintf(str, ":FUNC:WREC:FINT %e", fint); sprintf(str, ":FUNC:WREC:FINT %e", fint);
} }
@ -351,7 +351,7 @@ void UI_playback_window::rep_fint_spinbox_changed(double fint)
mainwindow->statusLabel->setText(str); mainwindow->statusLabel->setText(str);
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
sprintf(str, ":FUNC:WREP:FINT %e", fint); sprintf(str, ":FUNC:WREP:FINT %e", fint);
} }

Wyświetl plik

@ -1562,7 +1562,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:MODE?") != 11) if(tmc_write(":BUS1:MODE?") != 11)
{ {
@ -1608,7 +1608,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:DISP?") != 11) if(tmc_write(":BUS1:DISP?") != 11)
{ {
@ -1635,7 +1635,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:FORM?") != 11) if(tmc_write(":BUS1:FORM?") != 11)
{ {
@ -1681,7 +1681,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:OFFS?") != 15) if(tmc_write(":BUS1:SPI:OFFS?") != 15)
{ {
@ -1708,7 +1708,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:MISO:THR?") != 19) if(tmc_write(":BUS1:SPI:MISO:THR?") != 19)
{ {
@ -1735,7 +1735,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:MOSI:THR?") != 19) if(tmc_write(":BUS1:SPI:MOSI:THR?") != 19)
{ {
@ -1762,7 +1762,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SCLK:THR?") != 19) if(tmc_write(":BUS1:SPI:SCLK:THR?") != 19)
{ {
@ -1789,7 +1789,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SS:THR?") != 17) if(tmc_write(":BUS1:SPI:SS:THR?") != 17)
{ {
@ -1814,7 +1814,7 @@ void read_settings_thread::run()
devparms->math_decode_threshold[3] = atof(device->buf); devparms->math_decode_threshold[3] = atof(device->buf);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
@ -1851,7 +1851,7 @@ void read_settings_thread::run()
devparms->math_decode_threshold_uart_rx = atof(device->buf) * 10.0; // hack for firmware bug! devparms->math_decode_threshold_uart_rx = atof(device->buf) * 10.0; // hack for firmware bug!
} }
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
@ -1872,7 +1872,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:RX?") != 15) if(tmc_write(":BUS1:RS232:RX?") != 15)
{ {
@ -1922,7 +1922,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:TX?") != 15) if(tmc_write(":BUS1:RS232:TX?") != 15)
{ {
@ -1972,7 +1972,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:POL?") != 16) if(tmc_write(":BUS1:RS232:POL?") != 16)
{ {
@ -2006,7 +2006,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:END?") != 16) if(tmc_write(":BUS1:RS232:END?") != 16)
{ {
@ -2040,7 +2040,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:BAUD?") != 17) if(tmc_write(":BUS1:RS232:BAUD?") != 17)
{ {
@ -2067,7 +2067,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:DBIT?") != 17) if(tmc_write(":BUS1:RS232:DBIT?") != 17)
{ {
@ -2094,7 +2094,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:SBIT?") != 17) if(tmc_write(":BUS1:RS232:SBIT?") != 17)
{ {
@ -2132,7 +2132,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:RS232:PAR?") != 16) if(tmc_write(":BUS1:RS232:PAR?") != 16)
{ {
@ -2174,7 +2174,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SCLK:SOUR?") != 20) if(tmc_write(":BUS1:SPI:SCLK:SOUR?") != 20)
{ {
@ -2216,7 +2216,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:MISO:SOUR?") != 20) if(tmc_write(":BUS1:SPI:MISO:SOUR?") != 20)
{ {
@ -2266,7 +2266,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:MOSI:SOUR?") != 20) if(tmc_write(":BUS1:SPI:MOSI:SOUR?") != 20)
{ {
@ -2316,7 +2316,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SS:SOUR?") != 18) if(tmc_write(":BUS1:SPI:SS:SOUR?") != 18)
{ {
@ -2366,7 +2366,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SS:POL?") != 17) if(tmc_write(":BUS1:SPI:SS:POL?") != 17)
{ {
@ -2406,7 +2406,7 @@ void read_settings_thread::run()
devparms->math_decode_spi_select = 1; devparms->math_decode_spi_select = 1;
} }
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
@ -2432,7 +2432,7 @@ void read_settings_thread::run()
} }
} }
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
@ -2453,7 +2453,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:MOSI:POL?") != 19) if(tmc_write(":BUS1:SPI:MOSI:POL?") != 19)
{ {
@ -2487,7 +2487,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:SCLK:SLOP?") != 20) if(tmc_write(":BUS1:SPI:SCLK:SLOP?") != 20)
{ {
@ -2529,7 +2529,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:DBIT?") != 15) if(tmc_write(":BUS1:SPI:DBIT?") != 15)
{ {
@ -2556,7 +2556,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie == 6) if(devparms->modelserie == 6 || devparms->modelserie == 4)
{ {
if(tmc_write(":BUS1:SPI:END?") != 14) if(tmc_write(":BUS1:SPI:END?") != 14)
{ {
@ -2590,7 +2590,7 @@ void read_settings_thread::run()
usleep(TMC_GDS_DELAY); usleep(TMC_GDS_DELAY);
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
if(tmc_write(":FUNC:WREC:ENAB?") != 16) if(tmc_write(":FUNC:WREC:ENAB?") != 16)
{ {

Wyświetl plik

@ -1795,7 +1795,7 @@ void SignalCurve::mouseReleaseEvent(QMouseEvent *release_event)
devparms->fft_voffset = nearbyint(devparms->fft_voffset * 10.0) / 10.0; devparms->fft_voffset = nearbyint(devparms->fft_voffset * 10.0) / 10.0;
} }
if(devparms->modelserie != 6) if(devparms->modelserie != 6 && devparms->modelserie != 4)
{ {
sprintf(str, ":MATH:OFFS %e", devparms->fft_voffset); sprintf(str, ":MATH:OFFS %e", devparms->fft_voffset);