Commit 3aee725b authored by DreamSourceLab's avatar DreamSourceLab

fix compile errors

parent 80fcecf5
...@@ -34,7 +34,7 @@ project(DSLogic) ...@@ -34,7 +34,7 @@ project(DSLogic)
option(DISABLE_WERROR "Build without -Werror" TRUE) option(DISABLE_WERROR "Build without -Werror" TRUE)
option(ENABLE_SIGNALS "Build with UNIX signals" TRUE) option(ENABLE_SIGNALS "Build with UNIX signals" TRUE)
option(ENABLE_DECODE "Build with libsigrokdecode" TRUE) option(ENABLE_DECODE "Build with libsigrokdecode" FALSE)
option(ENABLE_COTIRE "Enable cotire" FALSE) option(ENABLE_COTIRE "Enable cotire" FALSE)
option(ENABLE_TESTS "Enable unit tests" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE)
option(STATIC_PKGDEPS_LIBS "Statically link to (pkg-config) libraries" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkg-config) libraries" FALSE)
...@@ -154,7 +154,6 @@ set(DSLogic_SOURCES ...@@ -154,7 +154,6 @@ set(DSLogic_SOURCES
pv/prop/string.cpp pv/prop/string.cpp
pv/prop/binding/binding.cpp pv/prop/binding/binding.cpp
pv/prop/binding/deviceoptions.cpp pv/prop/binding/deviceoptions.cpp
pv/prop/binding/decoderoptions.cpp
pv/toolbars/filebar.cpp pv/toolbars/filebar.cpp
pv/toolbars/logobar.cpp pv/toolbars/logobar.cpp
pv/toolbars/samplingbar.cpp pv/toolbars/samplingbar.cpp
......
...@@ -40,7 +40,7 @@ Annotation::Annotation(const srd_proto_data *const pdata) : ...@@ -40,7 +40,7 @@ Annotation::Annotation(const srd_proto_data *const pdata) :
(const srd_proto_data_annotation*)pdata->data; (const srd_proto_data_annotation*)pdata->data;
assert(pda); assert(pda);
_format = pda->ann_format; _format = pda->ann_class;
const char *const *annotations = (char**)pda->ann_text; const char *const *annotations = (char**)pda->ann_text;
while(*annotations) { while(*annotations) {
......
...@@ -521,9 +521,11 @@ bool MainWindow::eventFilter(QObject *object, QEvent *event) ...@@ -521,9 +521,11 @@ bool MainWindow::eventFilter(QObject *object, QEvent *event)
else else
on_trigger(!_trigger_dock->isVisible()); on_trigger(!_trigger_dock->isVisible());
break; break;
#ifdef ENABLE_DECODE
case Qt::Key_D: case Qt::Key_D:
on_protocol(!_protocol_dock->isVisible()); on_protocol(!_protocol_dock->isVisible());
break; break;
#endif
case Qt::Key_M: case Qt::Key_M:
on_measure(!_measure_dock->isVisible()); on_measure(!_measure_dock->isVisible());
break; break;
......
...@@ -476,9 +476,10 @@ void SigSession::init_signals() ...@@ -476,9 +476,10 @@ void SigSession::init_signals()
unsigned int dso_probe_count = 0; unsigned int dso_probe_count = 0;
unsigned int analog_probe_count = 0; unsigned int analog_probe_count = 0;
#ifdef ENABLE_DECODE
// Clear the decode traces // Clear the decode traces
_decode_traces.clear(); _decode_traces.clear();
#endif
// Detect what data types we will receive // Detect what data types we will receive
if(_dev_inst) { if(_dev_inst) {
...@@ -786,11 +787,13 @@ void SigSession::data_feed_in(const struct sr_dev_inst *sdi, ...@@ -786,11 +787,13 @@ void SigSession::data_feed_in(const struct sr_dev_inst *sdi,
_cur_dso_snapshot.reset(); _cur_dso_snapshot.reset();
_cur_analog_snapshot.reset(); _cur_analog_snapshot.reset();
} }
#ifdef ENABLE_DECODE
for (vector< shared_ptr<view::DecodeTrace> >::iterator i = for (vector< shared_ptr<view::DecodeTrace> >::iterator i =
_decode_traces.begin(); _decode_traces.begin();
i != _decode_traces.end(); i != _decode_traces.end();
i++) i++)
(*i)->decoder()->stop_decode(); (*i)->decoder()->stop_decode();
#endif
frame_ended(); frame_ended();
break; break;
} }
......
...@@ -222,7 +222,9 @@ private: ...@@ -222,7 +222,9 @@ private:
mutable boost::mutex _signals_mutex; mutable boost::mutex _signals_mutex;
std::vector< boost::shared_ptr<view::Signal> > _signals; std::vector< boost::shared_ptr<view::Signal> > _signals;
std::vector< boost::shared_ptr<view::GroupSignal> > _group_traces; std::vector< boost::shared_ptr<view::GroupSignal> > _group_traces;
#ifdef ENABLE_DECODE
std::vector< boost::shared_ptr<view::DecodeTrace> > _decode_traces; std::vector< boost::shared_ptr<view::DecodeTrace> > _decode_traces;
#endif
mutable boost::mutex _data_mutex; mutable boost::mutex _data_mutex;
boost::shared_ptr<data::Logic> _logic_data; boost::shared_ptr<data::Logic> _logic_data;
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
namespace pv { namespace pv {
namespace view { namespace view {
dslDial::dslDial(quint64 div, quint64 step, dslDial::dslDial(const quint64 div, const quint64 step,
QVector<quint64> value, QVector<QString> unit) const QVector<quint64> value, const QVector<QString> unit)
{ {
assert(div > 0); assert(div > 0);
assert(step > 0); assert(step > 0);
......
...@@ -10,8 +10,8 @@ namespace view { ...@@ -10,8 +10,8 @@ namespace view {
class dslDial class dslDial
{ {
public: public:
dslDial(quint64 div, quint64 step, dslDial(const quint64 div, const quint64 step,
QVector<quint64> value, QVector<QString> unit); const QVector<quint64> value, const QVector<QString> unit);
virtual ~dslDial(); virtual ~dslDial();
public: public:
......
...@@ -113,9 +113,9 @@ DsoSignal::DsoSignal(boost::shared_ptr<pv::device::DevInst> dev_inst, ...@@ -113,9 +113,9 @@ DsoSignal::DsoSignal(boost::shared_ptr<pv::device::DevInst> dev_inst,
_trig_vpos(probe->index * 0.5 + 0.25), _trig_vpos(probe->index * 0.5 + 0.25),
_zeroPos(probe->index * 0.5 + 0.25) _zeroPos(probe->index * 0.5 + 0.25)
{ {
QVector<uint64_t> vValue; QVector<quint64> vValue;
QVector<QString> vUnit; QVector<QString> vUnit;
QVector<uint64_t> hValue; QVector<quint64> hValue;
QVector<QString> hUnit; QVector<QString> hUnit;
for(quint64 i = 0; i < vDialValueCount; i++) for(quint64 i = 0; i < vDialValueCount; i++)
vValue.append(vDialValue[i]); vValue.append(vDialValue[i]);
......
...@@ -45,8 +45,8 @@ private: ...@@ -45,8 +45,8 @@ private:
static const float EnvelopeThreshold; static const float EnvelopeThreshold;
static const int HitCursorMargin = 3; static const int HitCursorMargin = 3;
static const uint64_t vDialValueCount = 10; static const quint64 vDialValueCount = 10;
static const uint64_t vDialValueStep = 1000; static const quint64 vDialValueStep = 1000;
static const uint64_t vDialUnitCount = 2; static const uint64_t vDialUnitCount = 2;
static const uint64_t hDialValueCount = 22; static const uint64_t hDialValueCount = 22;
static const uint64_t hDialValueStep = 1000; static const uint64_t hDialValueStep = 1000;
......
libsigrokdecode @ 280d554c
Subproject commit 280d554c29fc234d27be77d602436395d01da6dd
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment