From f7ae998e69fb2de63d52f368c906bec03ff07235 Mon Sep 17 00:00:00 2001 From: DreamSourceLab Date: Wed, 13 Nov 2019 07:37:05 -0800 Subject: [PATCH] Fix compile issues --- DSView/pv/dialogs/calibration.cpp | 2 +- DSView/pv/dialogs/waitingdialog.cpp | 5 +++-- DSView/pv/dialogs/waitingdialog.h | 6 ++++-- DSView/pv/storesession.cpp | 2 +- DSView/pv/toolbars/samplingbar.cpp | 4 ++-- libsigrok4DSL/hardware/DSL/dsl.c | 6 +++--- libsigrok4DSL/libsigrok.h | 1 + 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/DSView/pv/dialogs/calibration.cpp b/DSView/pv/dialogs/calibration.cpp index ab11ca95..5a42222d 100755 --- a/DSView/pv/dialogs/calibration.cpp +++ b/DSView/pv/dialogs/calibration.cpp @@ -181,7 +181,7 @@ void Calibration::set_device(boost::shared_ptr dev_inst) _label_list.push_back(off_label); bool comb_comp_en = false; - gvar = _dev_inst->get_config(probe, NULL, SR_CONF_PROBE_COMB_COMP_EN); + gvar = _dev_inst->get_config(NULL, NULL, SR_CONF_PROBE_COMB_COMP_EN); if (gvar != NULL) { comb_comp_en = g_variant_get_boolean(gvar); g_variant_unref(gvar); diff --git a/DSView/pv/dialogs/waitingdialog.cpp b/DSView/pv/dialogs/waitingdialog.cpp index 45898399..b4bcdb26 100755 --- a/DSView/pv/dialogs/waitingdialog.cpp +++ b/DSView/pv/dialogs/waitingdialog.cpp @@ -31,6 +31,7 @@ #include #include "../view/trace.h" +#include "../view/dsosignal.h" using namespace boost; using namespace std; @@ -41,10 +42,10 @@ namespace dialogs { const QString WaitingDialog::TIPS_WAIT = "Waiting"; const QString WaitingDialog::TIPS_FINISHED = "Finished!"; -WaitingDialog::WaitingDialog(QWidget *parent, boost::shared_ptr dev_inst, int key) : +WaitingDialog::WaitingDialog(QWidget *parent, SigSession &session, int key) : DSDialog(parent), _key(key), - _dev_inst(dev_inst), + _session(session), _button_box(QDialogButtonBox::Abort, Qt::Horizontal, this) { diff --git a/DSView/pv/dialogs/waitingdialog.h b/DSView/pv/dialogs/waitingdialog.h index 5c06e3c9..fd14615a 100755 --- a/DSView/pv/dialogs/waitingdialog.h +++ b/DSView/pv/dialogs/waitingdialog.h @@ -30,7 +30,8 @@ #include -#include +#include "../sigsession.h" +#include "../device/devinst.h" #include "../toolbars/titlebar.h" #include "dsdialog.h" @@ -52,7 +53,7 @@ private: static const QString TIPS_FINISHED; public: - WaitingDialog(QWidget *parent, boost::shared_ptr dev_inst, int key); + WaitingDialog(QWidget *parent, SigSession &session, int key); int start(); protected: @@ -65,6 +66,7 @@ private slots: private: int _key; + SigSession &_session; boost::shared_ptr _dev_inst; toolbars::TitleBar *_titlebar; QDialogButtonBox _button_box; diff --git a/DSView/pv/storesession.cpp b/DSView/pv/storesession.cpp index 49b07f25..f637e62a 100755 --- a/DSView/pv/storesession.cpp +++ b/DSView/pv/storesession.cpp @@ -394,7 +394,7 @@ QString StoreSession::meta_gen(boost::shared_ptr snapshot) g_variant_unref(gvar); } } else if (sdi->mode == LOGIC) { - fprintf(meta, "trigger time = %lld\n", _session.get_trigger_time().toMSecsSinceEpoch()); + fprintf(meta, "trigger time = %lld\n", _session.get_session_time().toMSecsSinceEpoch()); } else if (sdi->mode == ANALOG) { shared_ptr analog_snapshot; if ((analog_snapshot = dynamic_pointer_cast(snapshot))) { diff --git a/DSView/pv/toolbars/samplingbar.cpp b/DSView/pv/toolbars/samplingbar.cpp index abe951b4..8a079958 100755 --- a/DSView/pv/toolbars/samplingbar.cpp +++ b/DSView/pv/toolbars/samplingbar.cpp @@ -354,8 +354,8 @@ void SamplingBar::zero_adj() run_stop(); - pv::dialogs::WaitingDialog wait(this, get_selected_device(), SR_CONF_ZERO); - if (wait.start() ==QDialog::Rejected) { + pv::dialogs::WaitingDialog wait(this, _session, SR_CONF_ZERO); + if (wait.start() == QDialog::Rejected) { BOOST_FOREACH(const boost::shared_ptr s, _session.get_signals()) { if ((dsoSig = dynamic_pointer_cast(s))) diff --git a/libsigrok4DSL/hardware/DSL/dsl.c b/libsigrok4DSL/hardware/DSL/dsl.c index 63276f0b..059f0302 100755 --- a/libsigrok4DSL/hardware/DSL/dsl.c +++ b/libsigrok4DSL/hardware/DSL/dsl.c @@ -68,9 +68,9 @@ static const char *probe_names[] = { }; static struct sr_dev_mode mode_list[] = { - {LOGIC, "Logic Analyzer", "逻辑分析仪", "la.png"}, - {ANALOG, "Data Acquisition", "数据记录仪", "daq.png"}, - {DSO, "Oscilloscope", "示波器", "osc.png"}, + {LOGIC, "Logic Analyzer", "逻辑分析仪", "la", "la.png"}, + {ANALOG, "Data Acquisition", "数据记录仪", "daq", "daq.png"}, + {DSO, "Oscilloscope", "示波器", "osc", "osc.png"}, }; SR_PRIV void dsl_probe_init(struct sr_dev_inst *sdi) diff --git a/libsigrok4DSL/libsigrok.h b/libsigrok4DSL/libsigrok.h index 8bb0955d..771ca831 100755 --- a/libsigrok4DSL/libsigrok.h +++ b/libsigrok4DSL/libsigrok.h @@ -1154,6 +1154,7 @@ struct sr_dev_mode { int mode; char *name; char *name_cn; + char *acronym; char *icon; };