Fix compile issues

This commit is contained in:
DreamSourceLab 2019-11-13 07:37:05 -08:00
parent d7ece2f45c
commit f7ae998e69
7 changed files with 15 additions and 11 deletions

View File

@ -181,7 +181,7 @@ void Calibration::set_device(boost::shared_ptr<device::DevInst> 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);

View File

@ -31,6 +31,7 @@
#include <QVBoxLayout>
#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<pv::device::DevInst> 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)
{

View File

@ -30,7 +30,8 @@
#include <boost/shared_ptr.hpp>
#include <pv/device/devinst.h>
#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<pv::device::DevInst> 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<pv::device::DevInst> _dev_inst;
toolbars::TitleBar *_titlebar;
QDialogButtonBox _button_box;

View File

@ -394,7 +394,7 @@ QString StoreSession::meta_gen(boost::shared_ptr<data::Snapshot> 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<data::AnalogSnapshot> analog_snapshot;
if ((analog_snapshot = dynamic_pointer_cast<data::AnalogSnapshot>(snapshot))) {

View File

@ -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<view::Signal> s, _session.get_signals())
{
if ((dsoSig = dynamic_pointer_cast<view::DsoSignal>(s)))

View File

@ -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)

View File

@ -1154,6 +1154,7 @@ struct sr_dev_mode {
int mode;
char *name;
char *name_cn;
char *acronym;
char *icon;
};