Fix some minor display/platform issues
@@ -36,25 +36,8 @@
|
||||
<file>icons/gear.png</file>
|
||||
<file>icons/wiki.png</file>
|
||||
<file>icons/wait.gif</file>
|
||||
<file>icons/file_cn.png</file>
|
||||
<file>icons/file_dis_cn.png</file>
|
||||
<file>icons/instant_cn.png</file>
|
||||
<file>icons/measure_cn.png</file>
|
||||
<file>icons/measure_dis_cn.png</file>
|
||||
<file>icons/params_cn.png</file>
|
||||
<file>icons/params_dis_cn.png</file>
|
||||
<file>icons/protocol_dis_cn.png</file>
|
||||
<file>icons/search-bar_cn.png</file>
|
||||
<file>icons/search-bar_dis_cn.png</file>
|
||||
<file>icons/start_cn.png</file>
|
||||
<file>icons/stop_cn.png</file>
|
||||
<file>icons/trigger_cn.png</file>
|
||||
<file>icons/trigger_dis_cn.png</file>
|
||||
<file>icons/protocol_cn.png</file>
|
||||
<file>icons/instant_dis.png</file>
|
||||
<file>icons/instant_dis_cn.png</file>
|
||||
<file>icons/start_dis.png</file>
|
||||
<file>icons/start_dis_cn.png</file>
|
||||
<file>icons/settings.png</file>
|
||||
<file>darkstyle/style.qss</file>
|
||||
<file>icons/export.png</file>
|
||||
|
||||
@@ -881,6 +881,11 @@ QDockWidget {
|
||||
titlebar-normal-icon: url(:/qss_icons/rc/undock.png);
|
||||
}
|
||||
|
||||
QDockWidget::title {
|
||||
border: 1px solid #282727;
|
||||
background-color: #2b2a2a;
|
||||
}
|
||||
|
||||
QDockWidget::close-button, QDockWidget::float-button {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
|
||||
0
DSView/icons/Blackman.png
Executable file → Normal file
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
0
DSView/icons/Flat_top.png
Executable file → Normal file
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
0
DSView/icons/Hamming.png
Executable file → Normal file
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
0
DSView/icons/Hann.png
Executable file → Normal file
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
0
DSView/icons/Rectangle.png
Executable file → Normal file
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
0
DSView/icons/about.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
DSView/icons/close.png
Executable file → Normal file
|
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
0
DSView/icons/export.png
Executable file → Normal file
|
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
0
DSView/icons/fft.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/file.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
0
DSView/icons/file_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
0
DSView/icons/instant.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
0
DSView/icons/instant_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
0
DSView/icons/math.png
Executable file → Normal file
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
0
DSView/icons/math_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
0
DSView/icons/maximize.png
Executable file → Normal file
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
0
DSView/icons/measure.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
0
DSView/icons/measure_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/minimize.png
Executable file → Normal file
|
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
0
DSView/icons/next.png
Executable file → Normal file
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
0
DSView/icons/params.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/params_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
0
DSView/icons/pre.png
Executable file → Normal file
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
0
DSView/icons/protocol.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
0
DSView/icons/protocol_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/restore.png
Executable file → Normal file
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
0
DSView/icons/search-bar.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
0
DSView/icons/search-bar_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
0
DSView/icons/settings.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
DSView/icons/single.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
DSView/icons/single_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
DSView/icons/start.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/start_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
0
DSView/icons/stop.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 830 B |
0
DSView/icons/trigger.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
0
DSView/icons/trigger_dis.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
0
DSView/icons/wiki.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -36,11 +36,11 @@ namespace pv {
|
||||
namespace data {
|
||||
|
||||
const QString MathStack::windows_support[5] = {
|
||||
"Rectangle",
|
||||
"Hann",
|
||||
"Hamming",
|
||||
"Blackman",
|
||||
"Flat_top"
|
||||
QT_TR_NOOP("Rectangle"),
|
||||
QT_TR_NOOP("Hann"),
|
||||
QT_TR_NOOP("Hamming"),
|
||||
QT_TR_NOOP("Blackman"),
|
||||
QT_TR_NOOP("Flat_top")
|
||||
};
|
||||
|
||||
const uint64_t MathStack::length_support[5] = {
|
||||
|
||||
@@ -39,13 +39,13 @@ using namespace std;
|
||||
namespace pv {
|
||||
namespace dialogs {
|
||||
|
||||
const QString Calibration::VGAIN = tr(" VGAIN");
|
||||
const QString Calibration::VOFF = tr(" VOFF");
|
||||
const QString Calibration::VGAIN = QT_TR_NOOP(" VGAIN");
|
||||
const QString Calibration::VOFF = QT_TR_NOOP(" VOFF");
|
||||
|
||||
Calibration::Calibration(QWidget *parent) :
|
||||
DSDialog(parent)
|
||||
{
|
||||
this->setFixedSize(400, 200);
|
||||
this->setFixedSize(400, 250);
|
||||
this->setWindowOpacity(0.7);
|
||||
this->setModal(false);
|
||||
|
||||
@@ -55,7 +55,12 @@ Calibration::Calibration(QWidget *parent) :
|
||||
_exit_btn = new QPushButton(tr("Exit"), this);
|
||||
|
||||
_flayout = new QFormLayout();
|
||||
_flayout->setVerticalSpacing(10);
|
||||
_flayout->setFormAlignment(Qt::AlignLeft);
|
||||
_flayout->setLabelAlignment(Qt::AlignLeft);
|
||||
_flayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
QGridLayout *glayout = new QGridLayout();
|
||||
glayout->setVerticalSpacing(5);
|
||||
|
||||
glayout->addLayout(_flayout, 1, 0, 1, 5);
|
||||
glayout->addWidget(_save_btn, 2, 0);
|
||||
|
||||
@@ -45,8 +45,7 @@ DeviceOptions::DeviceOptions(QWidget *parent, boost::shared_ptr<pv::device::DevI
|
||||
_device_options_binding(_dev_inst->dev_inst())
|
||||
{
|
||||
_props_box = new QGroupBox(tr("Mode"), this);
|
||||
_props_box->setLayout(&_props_box_layout);
|
||||
_props_box_layout.addWidget(get_property_form());
|
||||
_props_box->setLayout(get_property_form(_props_box));
|
||||
_layout.addWidget(_props_box);
|
||||
|
||||
if (_dev_inst->dev_inst()->mode != DSO) {
|
||||
@@ -118,25 +117,27 @@ void DeviceOptions::reject()
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
QWidget* DeviceOptions::get_property_form()
|
||||
QGridLayout * DeviceOptions::get_property_form(QWidget * parent)
|
||||
{
|
||||
QWidget *const form = new QWidget(this);
|
||||
QFormLayout *const layout = new QFormLayout(form);
|
||||
form->setLayout(layout);
|
||||
QGridLayout *const layout = new QGridLayout(parent);
|
||||
layout->setVerticalSpacing(5);
|
||||
|
||||
const vector< boost::shared_ptr<pv::prop::Property> > &properties =
|
||||
_device_options_binding.properties();
|
||||
BOOST_FOREACH(boost::shared_ptr<pv::prop::Property> p, properties)
|
||||
int i = 0;
|
||||
BOOST_FOREACH(boost::shared_ptr<pv::prop::Property> p, properties)
|
||||
{
|
||||
assert(p);
|
||||
const QString label = p->labeled_widget() ? QString() : p->name();
|
||||
layout->addWidget(new QLabel(label, parent), i, 0);
|
||||
if (label == tr("Operation Mode"))
|
||||
layout->addRow(label, p->get_widget(form, true));
|
||||
layout->addWidget(p->get_widget(parent, true), i, 1);
|
||||
else
|
||||
layout->addRow(label, p->get_widget(form));
|
||||
layout->addWidget(p->get_widget(parent), i, 1);
|
||||
i++;
|
||||
}
|
||||
|
||||
return form;
|
||||
return layout;
|
||||
}
|
||||
|
||||
void DeviceOptions::setup_probes()
|
||||
@@ -177,8 +178,8 @@ void DeviceOptions::setup_probes()
|
||||
ch_opts->setChecked(true);
|
||||
}
|
||||
}
|
||||
g_variant_unref(gvar_opts);
|
||||
}
|
||||
g_variant_unref(gvar_opts);
|
||||
}
|
||||
|
||||
for (const GSList *l = _dev_inst->dev_inst()->channels; l; l = l->next) {
|
||||
|
||||
@@ -61,7 +61,7 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
QWidget* get_property_form();
|
||||
QGridLayout *get_property_form(QWidget *parent);
|
||||
|
||||
void setup_probes();
|
||||
|
||||
@@ -86,7 +86,6 @@ private:
|
||||
QVector <QCheckBox *> _probes_checkBox_list;
|
||||
|
||||
QGroupBox *_props_box;
|
||||
QVBoxLayout _props_box_layout;
|
||||
|
||||
QPushButton *_config_button;
|
||||
QPushButton *_cali_button;
|
||||
|
||||
@@ -169,26 +169,34 @@ FftOptions::FftOptions(QWidget *parent, SigSession &session) :
|
||||
}
|
||||
}
|
||||
|
||||
_flayout = new QFormLayout();
|
||||
_flayout->addRow(new QLabel(tr("FFT Enable: "), this), _en_checkbox);
|
||||
_flayout->addRow(new QLabel(tr("FFT Length: "), this), _len_combobox);
|
||||
_flayout->addRow(new QLabel(tr("Sample Interval: "), this), _interval_combobox);
|
||||
_flayout->addRow(new QLabel(tr("FFT Source: "), this), _ch_combobox);
|
||||
_flayout->addRow(new QLabel(tr("FFT Window: "), this), _window_combobox);
|
||||
_flayout->addRow(new QLabel(tr("DC Ignored: "), this), _dc_checkbox);
|
||||
_flayout->addRow(new QLabel(tr("Y-axis Mode: "), this), _view_combobox);
|
||||
_flayout->addRow(new QLabel(tr("DBV Range: "), this), _dbv_combobox);
|
||||
|
||||
_hlayout = new QHBoxLayout();
|
||||
_hlayout->addLayout(_flayout);
|
||||
_hint_label = new QLabel(this);
|
||||
QString hint_pic= ":/icons/" + _window_combobox->currentText()+".png";
|
||||
QPixmap pixmap(hint_pic);
|
||||
_hint_label->setPixmap(pixmap);
|
||||
_hlayout->addWidget(_hint_label);
|
||||
|
||||
_glayout = new QGridLayout();
|
||||
_glayout->setVerticalSpacing(5);
|
||||
_glayout->addWidget(new QLabel(tr("FFT Enable: "), this), 0, 0);
|
||||
_glayout->addWidget(_en_checkbox, 0, 1);
|
||||
_glayout->addWidget(new QLabel(tr("FFT Length: "), this), 1, 0);
|
||||
_glayout->addWidget(_len_combobox, 1, 1);
|
||||
_glayout->addWidget(new QLabel(tr("Sample Interval: "), this), 2, 0);
|
||||
_glayout->addWidget(_interval_combobox, 2, 1);
|
||||
_glayout->addWidget(new QLabel(tr("FFT Source: "), this), 3, 0);
|
||||
_glayout->addWidget(_ch_combobox, 3, 1);
|
||||
_glayout->addWidget(new QLabel(tr("FFT Window: "), this), 4, 0);
|
||||
_glayout->addWidget(_window_combobox, 4, 1);
|
||||
_glayout->addWidget(new QLabel(tr("DC Ignored: "), this), 5, 0);
|
||||
_glayout->addWidget(_dc_checkbox, 5, 1);
|
||||
_glayout->addWidget(new QLabel(tr("Y-axis Mode: "), this), 6, 0);
|
||||
_glayout->addWidget(_view_combobox, 6, 1);
|
||||
_glayout->addWidget(new QLabel(tr("DBV Range: "), this), 7, 0);
|
||||
_glayout->addWidget(_dbv_combobox, 7, 1);
|
||||
_glayout->addWidget(_hint_label, 0, 2, 8, 1);
|
||||
|
||||
|
||||
_layout = new QVBoxLayout();
|
||||
_layout->addLayout(_hlayout);
|
||||
_layout->addLayout(_glayout);
|
||||
_layout->addWidget(&_button_box);
|
||||
|
||||
layout()->addLayout(_layout);
|
||||
|
||||
@@ -75,8 +75,7 @@ private:
|
||||
QComboBox *_dbv_combobox;
|
||||
|
||||
QLabel *_hint_label;
|
||||
QFormLayout *_flayout;
|
||||
QHBoxLayout *_hlayout;
|
||||
QGridLayout *_glayout;
|
||||
QVBoxLayout *_layout;
|
||||
QDialogButtonBox _button_box;
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ ProtocolExp::ProtocolExp(QWidget *parent, SigSession &session) :
|
||||
_format_combobox->addItem(tr("Text files (*.txt)"));
|
||||
|
||||
_flayout = new QFormLayout();
|
||||
_flayout->setVerticalSpacing(5);
|
||||
_flayout->setFormAlignment(Qt::AlignLeft);
|
||||
_flayout->setLabelAlignment(Qt::AlignLeft);
|
||||
_flayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
_flayout->addRow(new QLabel(tr("Export Format: "), this), _format_combobox);
|
||||
|
||||
pv::data::DecoderModel* decoder_model = _session.get_decoder_model();
|
||||
|
||||
@@ -63,6 +63,10 @@ ProtocolList::ProtocolList(QWidget *parent, SigSession &session) :
|
||||
_protocol_combobox->setCurrentIndex(index);
|
||||
|
||||
_flayout = new QFormLayout();
|
||||
_flayout->setVerticalSpacing(5);
|
||||
_flayout->setFormAlignment(Qt::AlignLeft);
|
||||
_flayout->setLabelAlignment(Qt::AlignLeft);
|
||||
_flayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
_flayout->addRow(new QLabel(tr("Decoded Protocols: "), this), _protocol_combobox);
|
||||
|
||||
_layout = new QVBoxLayout();
|
||||
|
||||
@@ -54,6 +54,7 @@ Search::Search(QWidget *parent, boost::shared_ptr<device::DevInst> dev_inst, QSt
|
||||
search_buttonBox.addButton(QDialogButtonBox::Cancel);
|
||||
|
||||
QGridLayout *search_layout = new QGridLayout();
|
||||
search_layout->setVerticalSpacing(5);
|
||||
search_layout->addWidget(search_label, 1, 1);
|
||||
search_layout->addWidget(new QLabel(tr("Search Value: ")), 2,0, Qt::AlignRight);
|
||||
search_layout->addWidget(&search_lineEdit, 2, 1);
|
||||
|
||||
@@ -40,8 +40,8 @@ using namespace std;
|
||||
namespace pv {
|
||||
namespace dialogs {
|
||||
|
||||
const QString WaitingDialog::TIPS_WAIT = tr("Waiting");
|
||||
const QString WaitingDialog::TIPS_FINISHED = tr("Finished!");
|
||||
const QString WaitingDialog::TIPS_WAIT = QT_TR_NOOP("Waiting");
|
||||
const QString WaitingDialog::TIPS_FINISHED = QT_TR_NOOP("Finished!");
|
||||
|
||||
WaitingDialog::WaitingDialog(QWidget *parent, boost::shared_ptr<pv::device::DevInst> dev_inst) :
|
||||
DSDialog(parent),
|
||||
|
||||
@@ -51,6 +51,7 @@ DsoTriggerDock::DsoTriggerDock(QWidget *parent, SigSession &session) :
|
||||
QScrollArea(parent),
|
||||
_session(session)
|
||||
{
|
||||
this->setWidgetResizable(true);
|
||||
_widget = new QWidget(this);
|
||||
|
||||
QLabel *position_label = new QLabel(tr("Trigger Position: "), _widget);
|
||||
@@ -127,6 +128,7 @@ DsoTriggerDock::DsoTriggerDock(QWidget *parent, SigSession &session) :
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(_widget);
|
||||
QGridLayout *gLayout = new QGridLayout();
|
||||
gLayout->setVerticalSpacing(5);
|
||||
gLayout->addWidget(position_label, 0, 0);
|
||||
gLayout->addWidget(position_spinBox, 0, 1);
|
||||
gLayout->addWidget(new QLabel(tr("%"), _widget), 0, 2);
|
||||
@@ -156,14 +158,14 @@ DsoTriggerDock::DsoTriggerDock(QWidget *parent, SigSession &session) :
|
||||
gLayout->addWidget(margin_label, 15, 0);
|
||||
gLayout->addWidget(margin_slider, 16, 0, 1, 4);
|
||||
|
||||
gLayout->setColumnStretch(3, 1);
|
||||
gLayout->setColumnStretch(4, 1);
|
||||
|
||||
layout->addLayout(gLayout);
|
||||
layout->addStretch(1);
|
||||
_widget->setLayout(layout);
|
||||
|
||||
this->setWidget(_widget);
|
||||
_widget->setGeometry(0, 0, sizeHint().width(), 500);
|
||||
//_widget->setGeometry(0, 0, sizeHint().width(), 500);
|
||||
_widget->setObjectName("dsoTriggerWidget");
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession &session) :
|
||||
_duty_label = new QLabel("#####", _widget);
|
||||
|
||||
_mouse_layout = new QGridLayout();
|
||||
_mouse_layout->setVerticalSpacing(5);
|
||||
_mouse_layout->addWidget(_fen_checkBox, 0, 0, 1, 4);
|
||||
_mouse_layout->addWidget(new QLabel(tr("W: "), _widget), 1, 0);
|
||||
_mouse_layout->addWidget(_width_label, 1, 1);
|
||||
@@ -97,6 +98,7 @@ MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession &session) :
|
||||
_t3_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
|
||||
_cursor_layout = new QGridLayout(_widget);
|
||||
_cursor_layout->setVerticalSpacing(5);
|
||||
_cursor_layout->addWidget(new QLabel(tr("T1: "), _widget), 0, 0);
|
||||
_cursor_layout->addWidget(_t1_comboBox, 0, 1);
|
||||
_cursor_layout->addWidget(new QLabel(tr("T2: "), _widget), 1, 0);
|
||||
|
||||
@@ -125,6 +125,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
|
||||
|
||||
QVBoxLayout *stage_layout = new QVBoxLayout();
|
||||
QGridLayout *stage_glayout = new QGridLayout();
|
||||
stage_glayout->setVerticalSpacing(5);
|
||||
stage_glayout->addWidget(value_exp_label, 1, 0);
|
||||
stage_glayout->addWidget(inv_exp_label, 1, 1);
|
||||
stage_glayout->addWidget(count_exp_label, 1, 2);
|
||||
@@ -197,6 +198,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
|
||||
|
||||
QVBoxLayout *serial_layout = new QVBoxLayout();
|
||||
QGridLayout *serial_glayout = new QGridLayout();
|
||||
serial_glayout->setVerticalSpacing(5);
|
||||
serial_glayout->addWidget(serial_value_exp_label, 1, 1, 1, 3);
|
||||
serial_glayout->addWidget(_serial_start_label, 2, 0);
|
||||
serial_glayout->addWidget(_serial_start_lineEdit, 2, 1, 1, 3);
|
||||
@@ -243,6 +245,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(_widget);
|
||||
QGridLayout *gLayout = new QGridLayout();
|
||||
gLayout->setVerticalSpacing(5);
|
||||
gLayout->addWidget(simple_radioButton, 0, 0);
|
||||
gLayout->addWidget(adv_radioButton, 1, 0);
|
||||
gLayout->addWidget(position_label, 2, 0);
|
||||
|
||||
@@ -254,6 +254,8 @@ void MainWindow::setup_ui()
|
||||
SLOT(malloc_error()));
|
||||
connect(&_session, SIGNAL(hardware_connect_failed()), this,
|
||||
SLOT(hardware_connect_failed()));
|
||||
connect(&_session, SIGNAL(on_mode_change()), this,
|
||||
SLOT(session_save()));
|
||||
|
||||
connect(_view, SIGNAL(cursor_update()), _measure_widget,
|
||||
SLOT(cursor_update()));
|
||||
@@ -295,7 +297,7 @@ void MainWindow::update_device_list()
|
||||
assert(_sampling_bar);
|
||||
|
||||
_session.stop_capture();
|
||||
_view->show_trig_cursor(false);
|
||||
_view->reload();
|
||||
_trigger_widget->device_change();
|
||||
#ifdef ENABLE_DECODE
|
||||
_protocol_widget->del_all_protocol();
|
||||
@@ -347,6 +349,11 @@ void MainWindow::reload()
|
||||
_session.reload();
|
||||
}
|
||||
|
||||
void MainWindow::mode_changed()
|
||||
{
|
||||
update_device_list();
|
||||
}
|
||||
|
||||
void MainWindow::load_file(QString file_name)
|
||||
{
|
||||
try {
|
||||
@@ -750,6 +757,7 @@ bool MainWindow::load_session(QString name)
|
||||
dsoSig->load_settings();
|
||||
dsoSig->set_zero_vrate(obj["zeroPos"].toDouble());
|
||||
dsoSig->set_trig_vrate(obj["trigValue"].toDouble());
|
||||
dsoSig->commit_settings();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,6 @@ public:
|
||||
const char *open_file_name = NULL,
|
||||
QWidget *parent = 0);
|
||||
|
||||
void session_save();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
@@ -88,6 +86,9 @@ private:
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
|
||||
public slots:
|
||||
void session_save();
|
||||
|
||||
private slots:
|
||||
void load_file(QString file_name);
|
||||
|
||||
@@ -99,6 +100,8 @@ private slots:
|
||||
*/
|
||||
void update_device_list();
|
||||
|
||||
void mode_changed();
|
||||
|
||||
void reload();
|
||||
|
||||
void show_session_error(
|
||||
|
||||
@@ -70,6 +70,10 @@ QWidget* Binding::get_property_form(QWidget *parent,
|
||||
{
|
||||
QWidget *const form = new QWidget(parent);
|
||||
QFormLayout *const layout = new QFormLayout(form);
|
||||
layout->setVerticalSpacing(5);
|
||||
layout->setFormAlignment(Qt::AlignLeft);
|
||||
layout->setLabelAlignment(Qt::AlignLeft);
|
||||
layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
form->setLayout(layout);
|
||||
add_properties_to_form(layout, auto_commit);
|
||||
return form;
|
||||
|
||||
@@ -473,7 +473,7 @@ double SigSession::cur_sampletime() const
|
||||
if (_cur_samplerate == 0)
|
||||
return 0;
|
||||
else
|
||||
return _cur_samplelimits * 1.0 / _cur_samplerate;
|
||||
return cur_samplelimits() * 1.0 / cur_samplerate();
|
||||
}
|
||||
|
||||
void SigSession::set_cur_samplerate(uint64_t samplerate)
|
||||
@@ -602,8 +602,6 @@ void SigSession::start_capture(bool instant,
|
||||
void SigSession::stop_capture()
|
||||
{
|
||||
_instant = false;
|
||||
//_data_lock = true;
|
||||
//_view_timer.stop();
|
||||
#ifdef ENABLE_DECODE
|
||||
for (vector< boost::shared_ptr<view::DecodeTrace> >::iterator i =
|
||||
_decode_traces.begin();
|
||||
|
||||
@@ -333,6 +333,8 @@ signals:
|
||||
|
||||
void show_wait_trigger();
|
||||
|
||||
void on_mode_change();
|
||||
|
||||
public slots:
|
||||
void reload();
|
||||
void refresh(int holdtime);
|
||||
|
||||
@@ -184,6 +184,7 @@ void TrigBar::reload()
|
||||
_search_action->setVisible(false);
|
||||
_math_action->setVisible(true);
|
||||
}
|
||||
enable_toggle(true);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ AnalogSignal::AnalogSignal(boost::shared_ptr<pv::device::DevInst> dev_inst,
|
||||
Signal(dev_inst, probe),
|
||||
_data(data)
|
||||
{
|
||||
_typeWidth = 2;
|
||||
_colour = SignalColours[probe->index % countof(SignalColours)];
|
||||
_scale = _totalHeight * 1.0f / 65536;
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ const QColor DecodeTrace::OutlineColours[16] = {
|
||||
QColor(0x6B, 0x23, 0x37)
|
||||
};
|
||||
|
||||
const QString DecodeTrace::RegionStart = "Start";
|
||||
const QString DecodeTrace::RegionEnd = "End ";
|
||||
const QString DecodeTrace::RegionStart = QT_TR_NOOP("Start");
|
||||
const QString DecodeTrace::RegionEnd = QT_TR_NOOP("End ");
|
||||
|
||||
DecodeTrace::DecodeTrace(pv::SigSession &session,
|
||||
boost::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
|
||||
@@ -377,6 +377,10 @@ void DecodeTrace::create_popup_form()
|
||||
_popup->reload(false);
|
||||
|
||||
_popup_form = new QFormLayout();
|
||||
_popup_form->setVerticalSpacing(5);
|
||||
_popup_form->setFormAlignment(Qt::AlignLeft);
|
||||
_popup_form->setLabelAlignment(Qt::AlignLeft);
|
||||
_popup_form->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
_popup->layout()->addLayout(_popup_form);
|
||||
_popup->setTitle(tr("Decoder Options"));
|
||||
|
||||
@@ -662,6 +666,11 @@ void DecodeTrace::create_decoder_form(
|
||||
this, SLOT(on_del_stack(boost::shared_ptr<data::decode::Decoder>&)));
|
||||
|
||||
QFormLayout *const decoder_form = new QFormLayout();
|
||||
decoder_form->setContentsMargins(0,0,0,0);
|
||||
decoder_form->setVerticalSpacing(5);
|
||||
decoder_form->setFormAlignment(Qt::AlignLeft);
|
||||
decoder_form->setLabelAlignment(Qt::AlignLeft);
|
||||
decoder_form->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
group->add_layout(decoder_form);
|
||||
|
||||
// Add the mandatory channels
|
||||
|
||||
@@ -75,6 +75,7 @@ void DevMode::set_device()
|
||||
|
||||
QPushButton *mode_button = new QPushButton(this);
|
||||
//mode_button->setFlat(true);
|
||||
mode_button->setMinimumWidth(32);
|
||||
mode_button->setText(mode->name);
|
||||
mode_button->setCheckable(true);
|
||||
|
||||
@@ -116,6 +117,7 @@ void DevMode::on_mode_change()
|
||||
if ((*i).first == button) {
|
||||
if (dev_inst->dev_inst()->mode != (*i).second->mode) {
|
||||
_session.stop_capture();
|
||||
_session.on_mode_change();
|
||||
dev_inst->set_config(NULL, NULL,
|
||||
SR_CONF_DEVICE_MODE,
|
||||
g_variant_new_int16((*i).second->mode));
|
||||
|
||||
@@ -437,7 +437,7 @@ bool DsoSignal::load_settings()
|
||||
// qDebug() << "ERROR: config_get SR_CONF_EN_CH failed.";
|
||||
// return false;
|
||||
//}
|
||||
gvar = _dev_inst->get_config(_probe, NULL, SR_CONF_DSO_BITS);
|
||||
gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_DSO_BITS);
|
||||
if (gvar != NULL) {
|
||||
_bits = g_variant_get_byte(gvar);
|
||||
g_variant_unref(gvar);
|
||||
@@ -564,6 +564,10 @@ int DsoSignal::commit_settings()
|
||||
ret = _dev_inst->set_config(_probe, NULL, SR_CONF_VPOS,
|
||||
g_variant_new_double(vpos_off));
|
||||
|
||||
// -- trig_value
|
||||
_dev_inst->set_config(_probe, NULL, SR_CONF_TRIGGER_VALUE,
|
||||
g_variant_new_byte(_trig_value));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -426,14 +426,15 @@ void Ruler::draw_logic_tick_mark(QPainter &p)
|
||||
const double SpacingIncrement = 32.0;
|
||||
const double MinValueSpacing = 16.0;
|
||||
const int ValueMargin = 5;
|
||||
|
||||
const double abs_min_period = 10.0 / _view.session().cur_samplerate();
|
||||
|
||||
double min_width = SpacingIncrement;
|
||||
double typical_width;
|
||||
double tick_period = 0;
|
||||
double scale = _view.scale();
|
||||
double offset = _view.offset();
|
||||
|
||||
const uint64_t cur_period_scale = ceil((_view.scale() * min_width) / abs_min_period);
|
||||
const uint64_t cur_period_scale = ceil((scale * min_width) / abs_min_period);
|
||||
|
||||
// Find tick spacing, and number formatting that does not cause
|
||||
// value to collide.
|
||||
@@ -442,19 +443,19 @@ void Ruler::draw_logic_tick_mark(QPainter &p)
|
||||
} else {
|
||||
_min_period = cur_period_scale * abs_min_period;
|
||||
}
|
||||
const int order = (int)floorf(log10f(_view.scale() * _view.get_view_width()));
|
||||
const int order = (int)floorf(log10f(scale * _view.get_view_width()));
|
||||
//const double order_decimal = pow(10, order);
|
||||
const unsigned int prefix = (order - FirstSIPrefixPower) / 3;
|
||||
_cur_prefix = prefix;
|
||||
assert(prefix < countof(SIPrefixes));
|
||||
typical_width = p.boundingRect(0, 0, INT_MAX, INT_MAX,
|
||||
AlignLeft | AlignTop, format_time(_view.offset(),
|
||||
AlignLeft | AlignTop, format_time(offset,
|
||||
prefix)).width() + MinValueSpacing;
|
||||
do
|
||||
{
|
||||
tick_period += _min_period;
|
||||
|
||||
} while(typical_width > tick_period / _view.scale());
|
||||
} while(typical_width > tick_period / scale);
|
||||
|
||||
const int text_height = p.boundingRect(0, 0, INT_MAX, INT_MAX,
|
||||
AlignLeft | AlignTop, "8").height();
|
||||
@@ -469,9 +470,9 @@ void Ruler::draw_logic_tick_mark(QPainter &p)
|
||||
assert(minor_prefix < countof(SIPrefixes));
|
||||
|
||||
const double first_major_division =
|
||||
floor(_view.offset() / tick_period);
|
||||
floor(offset / tick_period);
|
||||
const double first_minor_division =
|
||||
floor(_view.offset() / minor_tick_period + 1);
|
||||
floor(offset / minor_tick_period + 1);
|
||||
const double t0 = first_major_division * tick_period;
|
||||
|
||||
int division = (int)round(first_minor_division -
|
||||
@@ -491,7 +492,7 @@ void Ruler::draw_logic_tick_mark(QPainter &p)
|
||||
const double t = t0 + division * minor_tick_period;
|
||||
const double major_t = t0 + floor(division / MinPeriodScale) * tick_period;
|
||||
|
||||
x = (t - _view.offset()) / _view.scale();
|
||||
x = (t - offset) / scale;
|
||||
|
||||
if (division % MinPeriodScale == 0)
|
||||
{
|
||||
@@ -505,13 +506,13 @@ void Ruler::draw_logic_tick_mark(QPainter &p)
|
||||
else
|
||||
{
|
||||
// Draw a minor tick
|
||||
if (minor_tick_period / _view.scale() > 2 * typical_width)
|
||||
if (minor_tick_period / scale > 2 * typical_width)
|
||||
p.drawText(x, 2 * ValueMargin, 0, text_height,
|
||||
AlignCenter | AlignTop | TextDontClip,
|
||||
format_time(t, prefix));
|
||||
//else if ((tick_period / _view.scale() > width() / 4) && (minor_tick_period / _view.scale() > inc_text_width))
|
||||
else if (minor_tick_period / _view.scale() > 1.1 * inc_text_width ||
|
||||
tick_period / _view.scale() > _view.get_view_width())
|
||||
//else if ((tick_period / scale > width() / 4) && (minor_tick_period / scale > inc_text_width))
|
||||
else if (minor_tick_period / scale > 1.1 * inc_text_width ||
|
||||
tick_period / scale > _view.get_view_width())
|
||||
p.drawText(x, 2 * ValueMargin, 0, minor_tick_y1 + ValueMargin,
|
||||
AlignCenter | AlignTop | TextDontClip,
|
||||
format_time(t - major_t, minor_prefix));
|
||||
|
||||
@@ -83,7 +83,8 @@ Trace::Trace(QString name, uint16_t index, int type) :
|
||||
_v_offset(INT_MAX),
|
||||
_type(type),
|
||||
_sec_index(0),
|
||||
_totalHeight(30)
|
||||
_totalHeight(30),
|
||||
_typeWidth(SquareNum)
|
||||
{
|
||||
_index_list.push_back(index);
|
||||
}
|
||||
@@ -95,7 +96,8 @@ Trace::Trace(QString name, std::list<int> index_list, int type, int sec_index) :
|
||||
_type(type),
|
||||
_index_list(index_list),
|
||||
_sec_index(sec_index),
|
||||
_totalHeight(30)
|
||||
_totalHeight(30),
|
||||
_typeWidth(SquareNum)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -109,6 +111,7 @@ Trace::Trace(const Trace &t) :
|
||||
_sec_index(t._sec_index),
|
||||
_old_v_offset(t._old_v_offset),
|
||||
_totalHeight(t._totalHeight),
|
||||
_typeWidth(t._typeWidth),
|
||||
_text_size(t._text_size)
|
||||
{
|
||||
}
|
||||
@@ -404,7 +407,7 @@ int Trace::get_leftWidth() const
|
||||
|
||||
int Trace::get_rightWidth() const
|
||||
{
|
||||
return 2 * Margin + SquareNum * SquareWidth + 1.5 * SquareWidth;
|
||||
return 2 * Margin + _typeWidth * SquareWidth + 1.5 * SquareWidth;
|
||||
}
|
||||
|
||||
int Trace::get_headerHeight() const
|
||||
|
||||
@@ -306,6 +306,7 @@ protected:
|
||||
int _sec_index;
|
||||
int _old_v_offset;
|
||||
int _totalHeight;
|
||||
int _typeWidth;
|
||||
|
||||
QSizeF _text_size;
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@ View::View(SigSession &session, pv::toolbars::SamplingBar *sampling_bar, QWidget
|
||||
_time_viewport, SLOT(show_wait_trigger()));
|
||||
|
||||
connect(_devmode, SIGNAL(mode_changed()),
|
||||
parent, SLOT(update_device_list()), Qt::DirectConnection);
|
||||
parent, SLOT(mode_changed()), Qt::DirectConnection);
|
||||
|
||||
connect(_header, SIGNAL(traces_moved()),
|
||||
this, SLOT(on_traces_moved()));
|
||||
@@ -571,11 +571,13 @@ void View::update_scale_offset()
|
||||
if (_session.get_device()->dev_inst()->mode != DSO) {
|
||||
//_scale = (1.0 / sample_rate) / WellPixelsPerSample;
|
||||
_maxscale = _session.cur_sampletime() / (get_view_width() * MaxViewRate);
|
||||
_minscale = (1.0 / sample_rate) / MaxPixelsPerSample;
|
||||
} else {
|
||||
_scale = _session.get_device()->get_time_base() * 10.0 / get_view_width() * std::pow(10.0, -9.0);
|
||||
_maxscale = 1e9;
|
||||
_minscale = 1e-15;
|
||||
}
|
||||
_minscale = (1.0 / sample_rate) / MaxPixelsPerSample;
|
||||
|
||||
|
||||
_scale = max(min(_scale, _maxscale), _minscale);
|
||||
_offset = max(min(_offset, get_max_offset()), get_min_offset());
|
||||
@@ -595,11 +597,7 @@ void View::signals_changed()
|
||||
uint8_t max_height = MaxHeightUnit;
|
||||
vector< boost::shared_ptr<Trace> > time_traces;
|
||||
vector< boost::shared_ptr<Trace> > fft_traces;
|
||||
|
||||
if (_session.get_device()->dev_inst()->mode == LOGIC)
|
||||
_viewbottom->setFixedHeight(StatusHeight);
|
||||
else
|
||||
_viewbottom->setFixedHeight(10);
|
||||
int bits = 8;
|
||||
|
||||
BOOST_FOREACH(const boost::shared_ptr<Trace> t, get_traces(ALL_VIEW)) {
|
||||
if (_trace_view_map[t->get_type()] == TIME_VIEW)
|
||||
@@ -672,8 +670,14 @@ void View::signals_changed()
|
||||
next_v_offset += traceHeight + 2 * SignalMargin;
|
||||
|
||||
boost::shared_ptr<view::DsoSignal> dsoSig;
|
||||
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(t))
|
||||
dsoSig->set_scale(dsoSig->get_view_rect().height() / 256.0f);
|
||||
if (dsoSig = dynamic_pointer_cast<view::DsoSignal>(t)) {
|
||||
GVariant *gvar = _session.get_device()->get_config(NULL, NULL, SR_CONF_DSO_BITS);
|
||||
if (gvar != NULL) {
|
||||
bits = g_variant_get_byte(gvar);
|
||||
g_variant_unref(gvar);
|
||||
}
|
||||
dsoSig->set_scale(dsoSig->get_view_rect().height() * 1.0f / (1 << bits));
|
||||
}
|
||||
}
|
||||
_time_viewport->clear_measure();
|
||||
}
|
||||
@@ -1066,5 +1070,21 @@ void View::splitterMoved(int pos, int index)
|
||||
signals_changed();
|
||||
}
|
||||
|
||||
void View::reload()
|
||||
{
|
||||
show_trig_cursor(false);
|
||||
|
||||
/*
|
||||
* if headerwidth not change, viewport height will not be updated
|
||||
* lead to a wrong signal height
|
||||
*/
|
||||
if (_session.get_device()->dev_inst()->mode == LOGIC)
|
||||
_viewbottom->setFixedHeight(StatusHeight);
|
||||
else
|
||||
_viewbottom->setFixedHeight(10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
} // namespace view
|
||||
} // namespace pv
|
||||
|
||||
@@ -223,6 +223,7 @@ private:
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
public slots:
|
||||
void reload();
|
||||
void set_measure_en(int enable);
|
||||
void signals_changed();
|
||||
void data_updated();
|
||||
|
||||
@@ -242,18 +242,18 @@ void Viewport::paintSignals(QPainter &p)
|
||||
if (_view.session().get_device()->dev_inst()->mode == DSO &&
|
||||
_view.session().get_capture_state() == SigSession::Running) {
|
||||
uint8_t type;
|
||||
bool stream = false;
|
||||
bool roll = false;
|
||||
QString type_str="";
|
||||
GVariant *gvar = _view.session().get_device()->get_config(NULL, NULL, SR_CONF_STREAM);
|
||||
GVariant *gvar = _view.session().get_device()->get_config(NULL, NULL, SR_CONF_ROLL);
|
||||
if (gvar != NULL) {
|
||||
stream = g_variant_get_boolean(gvar);
|
||||
roll = g_variant_get_boolean(gvar);
|
||||
g_variant_unref(gvar);
|
||||
}
|
||||
gvar = _view.session().get_device()->get_config(NULL, NULL, SR_CONF_TRIGGER_SOURCE);
|
||||
if (gvar != NULL) {
|
||||
type = g_variant_get_byte(gvar);
|
||||
g_variant_unref(gvar);
|
||||
if (type == DSO_TRIGGER_AUTO && stream) {
|
||||
if (type == DSO_TRIGGER_AUTO && roll) {
|
||||
type_str = "Auto(Roll)";
|
||||
} else if (type == DSO_TRIGGER_AUTO && !_view.session().trigd()) {
|
||||
type_str = "Auto";
|
||||
@@ -929,9 +929,9 @@ void Viewport::measure()
|
||||
_cur_aftX = _view.hover_point().x();
|
||||
_cur_midY = logicSig->get_y() - logicSig->get_totalHeight()/2 - 5;
|
||||
|
||||
_em_rising = "Rising: " + QString::number(_edge_rising);
|
||||
_em_falling = "Falling: " + QString::number(_edge_falling);
|
||||
_em_edges = "Edges: " + QString::number(_edge_rising + _edge_falling);
|
||||
_em_rising = tr("Rising: ") + QString::number(_edge_rising);
|
||||
_em_falling = tr("Falling: ") + QString::number(_edge_falling);
|
||||
_em_edges = tr("Edges: ") + QString::number(_edge_rising + _edge_falling);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ DecoderGroupBox::DecoderGroupBox(boost::shared_ptr<data::DecoderStack> &decoder_
|
||||
_layout(new QGridLayout(this))
|
||||
{
|
||||
_layout->setContentsMargins(0, 0, 0, 0);
|
||||
_layout->setVerticalSpacing(5);
|
||||
setLayout(_layout);
|
||||
|
||||
_layout->addWidget(new QLabel(QString("<h3>%1</h3>").arg(_dec->decoder()->name), this),
|
||||
|
||||
@@ -1,38 +1,40 @@
|
||||
{
|
||||
"Device": "DSCope",
|
||||
"DeviceMode": 1,
|
||||
"Horizontal trigger position": "1",
|
||||
"Operation Mode": "Normal",
|
||||
"Sample count": "1048576",
|
||||
"Sample rate": "100000000",
|
||||
"Time base": "10000",
|
||||
"Trigger hold off": "0",
|
||||
"Trigger slope": "0",
|
||||
"Trigger source": "0",
|
||||
"channel": [
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"coupling": 0,
|
||||
"enabled": true,
|
||||
"index": 0,
|
||||
"name": "0",
|
||||
"trigValue": 0.5,
|
||||
"type": 10001,
|
||||
"vdiv": 1000,
|
||||
"vfactor": 1,
|
||||
"zeroPos": 0.5
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"coupling": 0,
|
||||
"enabled": true,
|
||||
"index": 1,
|
||||
"name": "1",
|
||||
"trigValue": 0.5,
|
||||
"type": 10001,
|
||||
"vdiv": 1000,
|
||||
"vfactor": 1,
|
||||
"zeroPos": 0.5
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"Device": "DSCope",
|
||||
"DeviceMode": 1,
|
||||
"Horizontal trigger position": "0",
|
||||
"Operation Mode": "Normal",
|
||||
"Sample count": "1048576",
|
||||
"Sample rate": "100000000",
|
||||
"Time base": "10000",
|
||||
"Trigger channel": "0",
|
||||
"Trigger hold off": "0",
|
||||
"Trigger margin": "8",
|
||||
"Trigger slope": "0",
|
||||
"Trigger source": "0",
|
||||
"channel": [
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"coupling": 0,
|
||||
"enabled": true,
|
||||
"index": 0,
|
||||
"name": "0",
|
||||
"trigValue": 0.50196078431372548,
|
||||
"type": 10001,
|
||||
"vdiv": 1000,
|
||||
"vfactor": 1,
|
||||
"zeroPos": 0.5
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"coupling": 0,
|
||||
"enabled": true,
|
||||
"index": 1,
|
||||
"name": "1",
|
||||
"trigValue": 0.50196078431372548,
|
||||
"type": 10001,
|
||||
"vdiv": 1000,
|
||||
"vfactor": 1,
|
||||
"zeroPos": 0.5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8,14 +8,16 @@
|
||||
"Sample count": "1048576",
|
||||
"Sample rate": "1000000",
|
||||
"Threshold Level": 1,
|
||||
"Trigger channel": "0",
|
||||
"Trigger hold off": "0",
|
||||
"Trigger margin": "8",
|
||||
"Trigger slope": "0",
|
||||
"Trigger source": "0",
|
||||
"Using Clock Negedge": 0,
|
||||
"Using External Clock": 0,
|
||||
"channel": [
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 0,
|
||||
"name": "0",
|
||||
@@ -23,7 +25,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 1,
|
||||
"name": "1",
|
||||
@@ -31,7 +33,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 2,
|
||||
"name": "2",
|
||||
@@ -39,7 +41,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 3,
|
||||
"name": "3",
|
||||
@@ -47,7 +49,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 4,
|
||||
"name": "4",
|
||||
@@ -55,7 +57,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 5,
|
||||
"name": "5",
|
||||
@@ -63,7 +65,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 6,
|
||||
"name": "6",
|
||||
@@ -71,7 +73,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 7,
|
||||
"name": "7",
|
||||
@@ -79,7 +81,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 8,
|
||||
"name": "8",
|
||||
@@ -87,7 +89,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 9,
|
||||
"name": "9",
|
||||
@@ -95,7 +97,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 10,
|
||||
"name": "10",
|
||||
@@ -103,7 +105,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 11,
|
||||
"name": "11",
|
||||
@@ -111,7 +113,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 12,
|
||||
"name": "12",
|
||||
@@ -119,7 +121,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 13,
|
||||
"name": "13",
|
||||
@@ -127,7 +129,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 14,
|
||||
"name": "14",
|
||||
@@ -135,7 +137,7 @@
|
||||
"type": 10000
|
||||
},
|
||||
{
|
||||
"colour": "#6a6a6a",
|
||||
"colour": "#969696",
|
||||
"enabled": true,
|
||||
"index": 15,
|
||||
"name": "15",
|
||||
|
||||
@@ -1,81 +1,82 @@
|
||||
{
|
||||
"Channel Mode": "Use Channels 0~15 (Max 100MHz)",
|
||||
"Device": "DSLogic",
|
||||
"DeviceMode": 2,
|
||||
"Filter Targets": "None",
|
||||
"Horizontal trigger position": "245",
|
||||
"Operation Mode": "Buffer Mode",
|
||||
"Sample count": "1048576",
|
||||
"Sample rate": "100000000",
|
||||
"Threshold Level": "1.8/2.5/3.3V Level",
|
||||
"Trigger hold off": "0",
|
||||
"Trigger slope": "0",
|
||||
"Trigger source": "0",
|
||||
"Using Clock Negedge": 0,
|
||||
"Using External Clock": 0,
|
||||
"channel": [
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 0,
|
||||
"name": "0",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"enabled": true,
|
||||
"index": 1,
|
||||
"name": "1",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#d50f25",
|
||||
"enabled": true,
|
||||
"index": 2,
|
||||
"name": "2",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"enabled": true,
|
||||
"index": 3,
|
||||
"name": "3",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 4,
|
||||
"name": "4",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"enabled": true,
|
||||
"index": 5,
|
||||
"name": "5",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#d50f25",
|
||||
"enabled": true,
|
||||
"index": 6,
|
||||
"name": "6",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"enabled": true,
|
||||
"index": 7,
|
||||
"name": "7",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 8,
|
||||
"name": "8",
|
||||
"type": 10002
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"Channel Mode": "Use Channels 0~15 (Max 10MHz)",
|
||||
"Device": "DSLogic",
|
||||
"DeviceMode": 2,
|
||||
"Filter Targets": "None",
|
||||
"Horizontal trigger position": "0",
|
||||
"Operation Mode": "Stream Mode",
|
||||
"Sample count": "1048576",
|
||||
"Sample rate": "1000000",
|
||||
"Threshold Level": "1.8/2.5/3.3V Level",
|
||||
"Trigger hold off": "0",
|
||||
"Trigger margin": "8",
|
||||
"Trigger slope": "0",
|
||||
"Trigger source": "0",
|
||||
"Using Clock Negedge": 0,
|
||||
"Using External Clock": 0,
|
||||
"channel": [
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 0,
|
||||
"name": "0",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"enabled": true,
|
||||
"index": 1,
|
||||
"name": "1",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#d50f25",
|
||||
"enabled": true,
|
||||
"index": 2,
|
||||
"name": "2",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"enabled": true,
|
||||
"index": 3,
|
||||
"name": "3",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 4,
|
||||
"name": "4",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#eeb211",
|
||||
"enabled": true,
|
||||
"index": 5,
|
||||
"name": "5",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#d50f25",
|
||||
"enabled": true,
|
||||
"index": 6,
|
||||
"name": "6",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#009925",
|
||||
"enabled": true,
|
||||
"index": 7,
|
||||
"name": "7",
|
||||
"type": 10002
|
||||
},
|
||||
{
|
||||
"colour": "#1185d1",
|
||||
"enabled": true,
|
||||
"index": 8,
|
||||
"name": "8",
|
||||
"type": 10002
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1276,11 +1276,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_boolean(devc->cali);
|
||||
break;
|
||||
case SR_CONF_STREAM:
|
||||
case SR_CONF_ROLL:
|
||||
if (!sdi)
|
||||
return SR_ERR;
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_boolean(devc->stream);
|
||||
*data = g_variant_new_boolean(devc->roll);
|
||||
break;
|
||||
case SR_CONF_TEST:
|
||||
if (!sdi)
|
||||
@@ -2408,7 +2408,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
|
||||
mstatus.vlen != 0 &&
|
||||
mstatus.vlen <= (transfer->actual_length - 512) / sample_width) ||
|
||||
devc->instant) {
|
||||
devc->stream = (mstatus.stream_mode != 0);
|
||||
devc->roll = (mstatus.stream_mode != 0);
|
||||
devc->mstatus_valid = TRUE;
|
||||
packet.type = SR_DF_DSO;
|
||||
packet.payload = &dso;
|
||||
|
||||
@@ -250,6 +250,7 @@ struct DSL_context {
|
||||
int zero_pcnt;
|
||||
int zero_comb;
|
||||
gboolean stream;
|
||||
gboolean roll;
|
||||
gboolean data_lock;
|
||||
uint8_t dso_bits;
|
||||
|
||||
|
||||
@@ -134,12 +134,12 @@ static const int32_t hwoptions_pro[] = {
|
||||
};
|
||||
|
||||
static const int32_t sessions[] = {
|
||||
SR_CONF_OPERATION_MODE,
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_SAMPLERATE,
|
||||
SR_CONF_LIMIT_SAMPLES,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
SR_CONF_OPERATION_MODE,
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_THRESHOLD,
|
||||
SR_CONF_FILTER,
|
||||
SR_CONF_TRIGGER_SLOPE,
|
||||
@@ -150,12 +150,12 @@ static const int32_t sessions[] = {
|
||||
};
|
||||
|
||||
static const int32_t sessions_pro[] = {
|
||||
SR_CONF_OPERATION_MODE,
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_SAMPLERATE,
|
||||
SR_CONF_LIMIT_SAMPLES,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
SR_CONF_OPERATION_MODE,
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_VTH,
|
||||
SR_CONF_FILTER,
|
||||
SR_CONF_TRIGGER_SLOPE,
|
||||
@@ -937,6 +937,7 @@ static uint64_t dso_cmd_gen(const struct sr_dev_inst *sdi, struct sr_channel* ch
|
||||
uint64_t cmd = 0;
|
||||
int channel_cnt = 0;
|
||||
GSList *l;
|
||||
struct sr_channel *en_probe;
|
||||
|
||||
devc = sdi->priv;
|
||||
|
||||
@@ -947,14 +948,18 @@ static uint64_t dso_cmd_gen(const struct sr_dev_inst *sdi, struct sr_channel* ch
|
||||
case SR_CONF_COUPLING:
|
||||
for (l = sdi->channels; l; l = l->next) {
|
||||
struct sr_channel *probe = (struct sr_channel *)l->data;
|
||||
if (probe->enabled)
|
||||
if (probe->enabled) {
|
||||
channel_cnt += probe->index + 0x1;
|
||||
en_probe = probe;
|
||||
}
|
||||
}
|
||||
if (channel_cnt == 0)
|
||||
return 0x0;
|
||||
|
||||
// --VDBS
|
||||
switch(ch->vdiv){
|
||||
if (channel_cnt != 1)
|
||||
en_probe = ch;
|
||||
switch(en_probe->vdiv){
|
||||
case 5: cmd += 0x247000; break;
|
||||
case 10: cmd += 0x23D000; break;
|
||||
case 20: cmd += 0x22F000; break;
|
||||
@@ -1317,6 +1322,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_boolean(devc->stream);
|
||||
break;
|
||||
case SR_CONF_ROLL:
|
||||
if (!sdi)
|
||||
return SR_ERR;
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_boolean(devc->roll);
|
||||
break;
|
||||
case SR_CONF_MAX_DSO_SAMPLERATE:
|
||||
if (!sdi)
|
||||
return SR_ERR;
|
||||
@@ -1410,7 +1421,6 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
|
||||
num_probes = devc->profile->dev_caps & DEV_CAPS_16BIT ? 16 : 8;
|
||||
devc->samplecounts_size = ARRAY_SIZE(samplecounts);
|
||||
} else if (sdi->mode == DSO) {
|
||||
sdi->mode = DSO;
|
||||
num_probes = devc->profile->dev_caps & DEV_CAPS_16BIT ? MAX_DSO_PROBES_NUM : 1;
|
||||
ret = command_dso_ctrl(usb->devhdl, dso_cmd_gen(sdi, NULL, SR_CONF_DSO_SYNC));
|
||||
if (ret != SR_OK)
|
||||
@@ -1558,8 +1568,13 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
|
||||
__func__, devc->th_level);
|
||||
} else if (id == SR_CONF_VTH) {
|
||||
devc->vth = g_variant_get_double(data);
|
||||
sr_dbg("%s: setting threshold voltage to %f failed",
|
||||
__func__, devc->vth);
|
||||
if ((ret = command_wr_reg(usb->devhdl, (uint8_t)(devc->vth/5.0*255), VTH_ADDR)) == SR_OK) {
|
||||
sr_err("%s: setting threshold voltage to %f",
|
||||
__func__, devc->vth);
|
||||
} else {
|
||||
sr_info("%s: setting threshold voltage to %f failed",
|
||||
__func__, devc->vth);
|
||||
}
|
||||
} else if (id == SR_CONF_FILTER) {
|
||||
stropt = g_variant_get_string(data, NULL);
|
||||
if (!strcmp(stropt, filters[SR_FILTER_NONE])) {
|
||||
@@ -1889,6 +1904,14 @@ static int dev_open(struct sr_dev_inst *sdi)
|
||||
sr_err("%s: Configure FPGA failed!", __func__);
|
||||
}
|
||||
g_free(fpga_bit);
|
||||
|
||||
if ((ret = command_wr_reg(usb->devhdl, (uint8_t)(devc->vth/5.0*255), VTH_ADDR)) == SR_OK) {
|
||||
sr_err("%s: setting threshold voltage to %f",
|
||||
__func__, devc->vth);
|
||||
} else {
|
||||
sr_info("%s: setting threshold voltage to %f failed",
|
||||
__func__, devc->vth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2144,7 +2167,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
|
||||
mstatus.vlen != 0 &&
|
||||
mstatus.vlen <= (transfer->actual_length - 512) / sample_width) ||
|
||||
devc->instant) {
|
||||
devc->stream = (mstatus.stream_mode != 0);
|
||||
devc->roll = (mstatus.stream_mode != 0);
|
||||
devc->mstatus_valid = TRUE;
|
||||
packet.type = SR_DF_DSO;
|
||||
packet.payload = &dso;
|
||||
@@ -2491,14 +2514,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
|
||||
else
|
||||
sr_dbg("%s: setting DSO Horiz Trigger Position to %d failed",
|
||||
__func__, devc->trigger_hpos);
|
||||
} else if (sdi->mode == LOGIC) {
|
||||
if ((ret = command_wr_reg(usb->devhdl, (uint8_t)(devc->vth/5.0*255), VTH_ADDR)) == SR_OK) {
|
||||
sr_err("%s: setting threshold voltage to %f",
|
||||
__func__, devc->vth);
|
||||
} else {
|
||||
sr_info("%s: setting threshold voltage to %f failed",
|
||||
__func__, devc->vth);
|
||||
}
|
||||
}
|
||||
|
||||
/* poll trigger status transfer*/
|
||||
|
||||
@@ -146,7 +146,7 @@ static const int32_t sessions[] = {
|
||||
SR_CONF_PATTERN_MODE,
|
||||
};
|
||||
|
||||
static const int const_dc = 50;
|
||||
static const int const_dc = 1.95 / 10 * 255;
|
||||
static const int sinx[] = {
|
||||
0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 16, 17, 18, 20, 21, 23, 24, 26, 27, 28,
|
||||
30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 41, 42, 43, 44, 45, 45, 46, 47, 47,
|
||||
@@ -357,7 +357,7 @@ static GSList *hw_scan(GSList *options)
|
||||
devc->limit_samples_show = devc->limit_samples;
|
||||
devc->limit_msec = 0;
|
||||
devc->sample_generator = PATTERN_SINE;
|
||||
devc->timebase = 200;
|
||||
devc->timebase = 500;
|
||||
devc->data_lock = FALSE;
|
||||
devc->max_height = 0;
|
||||
devc->dso_bits = 8;
|
||||
@@ -876,7 +876,8 @@ static void samples_generator(uint16_t *buf, uint64_t size,
|
||||
for (l = sdi->channels; l; l = l->next) {
|
||||
start_rand = devc->pre_index == 0 ? rand()%len : 0;
|
||||
probe = (struct sr_channel *)l->data;
|
||||
offset = ceil((0.5 - (probe->vpos/probe->vdiv/10.0)) * 255);
|
||||
//offset = ceil((0.5 - (probe->vpos/probe->vdiv/10.0)) * 255);
|
||||
offset = 128;
|
||||
pre0_i = devc->pre_index;
|
||||
pre1_i = devc->pre_index;
|
||||
for (i = devc->pre_index; i < devc->pre_index + size; i++) {
|
||||
|
||||
@@ -785,6 +785,9 @@ enum {
|
||||
/** Stream */
|
||||
SR_CONF_STREAM,
|
||||
|
||||
/** DSO Roll */
|
||||
SR_CONF_ROLL,
|
||||
|
||||
/** Test */
|
||||
SR_CONF_TEST,
|
||||
|
||||
|
||||