Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raptor Engineering Public Development
dsview
Commits
91938e44
Commit
91938e44
authored
Jul 17, 2015
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile warning
parent
aec079cb
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
51 additions
and
53 deletions
+51
-53
DSView/cmake_clear
DSView/cmake_clear
+2
-0
DSView/pv/data/decoderstack.h
DSView/pv/data/decoderstack.h
+1
-1
DSView/pv/data/logicsnapshot.cpp
DSView/pv/data/logicsnapshot.cpp
+3
-8
DSView/pv/mainwindow.cpp
DSView/pv/mainwindow.cpp
+0
-1
DSView/pv/prop/int.cpp
DSView/pv/prop/int.cpp
+14
-14
DSView/pv/sigsession.cpp
DSView/pv/sigsession.cpp
+6
-6
DSView/pv/sigsession.h
DSView/pv/sigsession.h
+2
-2
DSView/pv/view/cursor.cpp
DSView/pv/view/cursor.cpp
+2
-1
DSView/pv/view/logicsignal.cpp
DSView/pv/view/logicsignal.cpp
+0
-2
DSView/pv/view/trace.cpp
DSView/pv/view/trace.cpp
+1
-1
DSView/pv/view/trace.h
DSView/pv/view/trace.h
+1
-1
DSView/pv/view/viewport.cpp
DSView/pv/view/viewport.cpp
+1
-1
libsigrok4DSL/dsdevice.c
libsigrok4DSL/dsdevice.c
+2
-2
libsigrok4DSL/hardware/DSL/dscope.c
libsigrok4DSL/hardware/DSL/dscope.c
+2
-2
libsigrok4DSL/hardware/DSL/dslogic.c
libsigrok4DSL/hardware/DSL/dslogic.c
+2
-2
libsigrok4DSL/hardware/demo/demo.c
libsigrok4DSL/hardware/demo/demo.c
+3
-2
libsigrok4DSL/input/in_binary.c
libsigrok4DSL/input/in_binary.c
+1
-1
libsigrok4DSL/input/in_vcd.c
libsigrok4DSL/input/in_vcd.c
+1
-1
libsigrok4DSL/libsigrok-internal.h
libsigrok4DSL/libsigrok-internal.h
+1
-1
libsigrok4DSL/libsigrok.h
libsigrok4DSL/libsigrok.h
+1
-1
libsigrok4DSL/proto.h
libsigrok4DSL/proto.h
+1
-1
libsigrok4DSL/session_file.c
libsigrok4DSL/session_file.c
+4
-2
No files found.
DSView/cmake_clear
View file @
91938e44
...
...
@@ -3,4 +3,6 @@ rm ./cmake_install.cmake
rm -r ./CMakeFiles
rm ./Makefile
rm ./CMakeCache.txt
find . -name 'moc_*.cpp*' | xargs rm -rf
find . -name 'qrc_*.cpp' | xargs rm -rf
echo "rm cmake cache end..."
DSView/pv/data/decoderstack.h
View file @
91938e44
...
...
@@ -173,7 +173,7 @@ private:
QString
_error_message
;
std
::
auto
_ptr
<
boost
::
thread
>
_decode_thread
;
std
::
unique
_ptr
<
boost
::
thread
>
_decode_thread
;
decode_state
_decode_state
;
bool
_options_changed
;
...
...
DSView/pv/data/logicsnapshot.cpp
View file @
91938e44
...
...
@@ -192,9 +192,7 @@ void LogicSnapshot::get_subsampled_edges(
float
min_length
,
int
sig_index
)
{
uint64_t
index
=
start
;
unsigned
int
level
;
bool
last_sample
;
bool
fast_forward
;
assert
(
end
<=
get_sample_count
());
assert
(
start
<=
end
);
...
...
@@ -447,9 +445,9 @@ bool LogicSnapshot::get_pre_edge(
// If resolution is less than a mip map block,
// round up to the beginning of the mip-map block
// for this level of detail
const
int
min_level_scale_power
=
const
unsigned
int
min_level_scale_power
=
(
level
+
1
)
*
MipMapScalePower
;
if
(
index
<
(
1
<<
min_level_scale_power
))
if
(
index
<
(
uint64_t
)(
1
<<
min_level_scale_power
))
index
=
0
;
else
index
=
pow2_ceil
(
index
,
min_level_scale_power
)
-
(
1
<<
min_level_scale_power
)
-
1
;
...
...
@@ -539,16 +537,13 @@ bool LogicSnapshot::get_pre_edge(
// do a linear search for the next transition within the
// block
if
(
min_length
<
MipMapScaleFactor
)
{
for
(;
index
>
=
0
;
index
--
)
{
for
(;
index
>
0
;
index
--
)
{
const
bool
sample
=
(
get_sample
(
index
)
&
sig_mask
)
!=
0
;
if
(
sample
!=
last_sample
)
{
index
++
;
return
true
;
}
if
(
index
==
0
)
return
false
;
}
}
}
...
...
DSView/pv/mainwindow.cpp
View file @
91938e44
...
...
@@ -632,7 +632,6 @@ bool MainWindow::load_session(QString name)
bool
isEnabled
=
false
;
foreach
(
const
QJsonValue
&
value
,
sessionObj
[
"channel"
].
toArray
())
{
QJsonObject
obj
=
value
.
toObject
();
qDebug
(
"obj.index = %d"
,
obj
[
"index"
].
toDouble
());
if
((
probe
->
index
==
obj
[
"index"
].
toDouble
())
&&
(
probe
->
type
==
obj
[
"type"
].
toDouble
()))
{
isEnabled
=
true
;
...
...
DSView/pv/prop/int.cpp
View file @
91938e44
...
...
@@ -32,20 +32,20 @@
using
boost
::
optional
;
using
namespace
std
;
#define INT8_MIN (-0x7f - 1)
#define INT16_MIN (-0x7fff - 1)
#define INT32_MIN (-0x7fffffff - 1)
#define INT64_MIN (-0x7fffffffffffffff - 1)
#define INT8_MAX 0x7f
#define INT16_MAX 0x7fff
#define INT32_MAX 0x7fffffff
#define INT64_MAX 0x7fffffffffffffff
#define UINT8_MAX 0xff
#define UINT16_MAX 0xffff
#define UINT32_MAX 0xffffffff
#define UINT64_MAX 0xffffffffffffffff
//
#define INT8_MIN (-0x7f - 1)
//
#define INT16_MIN (-0x7fff - 1)
//
#define INT32_MIN (-0x7fffffff - 1)
//
#define INT64_MIN (-0x7fffffffffffffff - 1)
//
//
#define INT8_MAX 0x7f
//
#define INT16_MAX 0x7fff
//
#define INT32_MAX 0x7fffffff
//
#define INT64_MAX 0x7fffffffffffffff
//
//
#define UINT8_MAX 0xff
//
#define UINT16_MAX 0xffff
//
#define UINT32_MAX 0xffffffff
//
#define UINT64_MAX 0xffffffffffffffff
namespace
pv
{
namespace
prop
{
...
...
DSView/pv/sigsession.cpp
View file @
91938e44
...
...
@@ -205,7 +205,7 @@ QList<QString> SigSession::getSuportedExportFormats(){
format
.
append
((
*
supportedModules
)
->
id
);
format
.
append
(
")"
);
list
.
append
(
format
);
*
supportedModules
++
;
supportedModules
++
;
}
return
list
;
}
...
...
@@ -245,7 +245,7 @@ void SigSession::export_file(const QString name, QWidget* parent, const QString
outModule
=
*
supportedModules
;
break
;
}
*
supportedModules
++
;
supportedModules
++
;
}
if
(
outModule
==
NULL
)
return
;
...
...
@@ -283,8 +283,8 @@ void SigSession::export_file(const QString name, QWidget* parent, const QString
unsigned
char
*
datat
=
(
unsigned
char
*
)
snapshot
->
get_data
();
unsigned
int
numsamples
=
snapshot
->
get_sample_count
()
*
snapshot
->
unit_size
();
GString
*
data_out
;
int
usize
=
8192
;
int
size
=
usize
;
unsigned
int
usize
=
8192
;
unsigned
int
size
=
usize
;
struct
sr_datafeed_logic
lp
;
struct
sr_datafeed_packet
p
;
for
(
uint64_t
i
=
0
;
i
<
numsamples
;
i
+=
usize
){
...
...
@@ -311,8 +311,8 @@ void SigSession::export_file(const QString name, QWidget* parent, const QString
unsigned
char
*
datat
=
(
unsigned
char
*
)
snapshot
->
get_data
();
unsigned
int
numsamples
=
snapshot
->
get_sample_count
();
GString
*
data_out
;
int
usize
=
8192
;
int
size
=
usize
;
unsigned
int
usize
=
8192
;
unsigned
int
size
=
usize
;
struct
sr_datafeed_dso
dp
;
struct
sr_datafeed_packet
p
;
for
(
uint64_t
i
=
0
;
i
<
numsamples
;
i
+=
usize
){
...
...
DSView/pv/sigsession.h
View file @
91938e44
...
...
@@ -251,10 +251,10 @@ private:
boost
::
shared_ptr
<
data
::
GroupSnapshot
>
_cur_group_snapshot
;
int
_group_cnt
;
std
::
auto
_ptr
<
boost
::
thread
>
_sampling_thread
;
std
::
unique
_ptr
<
boost
::
thread
>
_sampling_thread
;
libusb_hotplug_callback_handle
_hotplug_handle
;
std
::
auto
_ptr
<
boost
::
thread
>
_hotplug
;
std
::
unique
_ptr
<
boost
::
thread
>
_hotplug
;
bool
_hot_attach
;
bool
_hot_detach
;
...
...
DSView/pv/view/cursor.cpp
View file @
91938e44
...
...
@@ -151,7 +151,8 @@ void Cursor::paint_fix_label(QPainter &p, const QRect &rect,
void
Cursor
::
compute_text_size
(
QPainter
&
p
,
unsigned
int
prefix
)
{
_text_size
=
p
.
boundingRect
(
QRectF
(),
0
,
(
void
)
prefix
;
_text_size
=
p
.
boundingRect
(
QRectF
(),
0
,
Ruler
::
format_real_time
(
_index
,
_view
.
session
().
get_device
()
->
get_sample_rate
())).
size
();
}
...
...
DSView/pv/view/logicsignal.cpp
View file @
91938e44
...
...
@@ -72,7 +72,6 @@ LogicSignal::LogicSignal(boost::shared_ptr<pv::device::DevInst> dev_inst,
Signal
(
dev_inst
,
probe
,
SR_CHANNEL_LOGIC
),
_data
(
data
)
{
assert
(
probe
->
index
>=
0
);
_colour
=
SignalColours
[
probe
->
index
%
countof
(
SignalColours
)];
}
...
...
@@ -82,7 +81,6 @@ LogicSignal::LogicSignal(const Signal &s,
Signal
(
s
,
probe
),
_data
(
data
)
{
assert
(
probe
->
index
>=
0
);
}
LogicSignal
::~
LogicSignal
()
...
...
DSView/pv/view/trace.cpp
View file @
91938e44
...
...
@@ -53,7 +53,7 @@ const QPen Trace::SignalAxisPen = QColor(128, 128, 128, 64);
const
QPen
Trace
::
AxisPen
(
QColor
(
128
,
128
,
128
,
64
));
const
int
Trace
::
LabelHitPadding
=
2
;
Trace
::
Trace
(
QString
name
,
in
t
index
,
int
type
)
:
Trace
::
Trace
(
QString
name
,
uint16_
t
index
,
int
type
)
:
_view
(
NULL
),
_name
(
name
),
_v_offset
(
INT_MAX
),
...
...
DSView/pv/view/trace.h
View file @
91938e44
...
...
@@ -84,7 +84,7 @@ public:
static
const
QPen
SignalAxisPen
;
protected:
Trace
(
QString
name
,
in
t
index
,
int
type
);
Trace
(
QString
name
,
uint16_
t
index
,
int
type
);
Trace
(
QString
name
,
std
::
list
<
int
>
index_list
,
int
type
,
int
sec_index
);
/**
...
...
DSView/pv/view/viewport.cpp
View file @
91938e44
...
...
@@ -444,7 +444,7 @@ void Viewport::mousePressEvent(QMouseEvent *event)
_dso_xm_index
[
i
-
1
]
=
min
(
_dso_xm_index
[
i
-
1
],
_dso_xm_index
[
i
]);
_dso_xm_index
[
i
]
=
max_index
;
}
_dso_xm_stage
=
(
++
_dso_xm_stage
)
%
(
DsoMeasureStages
+
1
);
_dso_xm_stage
=
(
_dso_xm_stage
+
1
)
%
(
DsoMeasureStages
+
1
);
}
}
}
...
...
libsigrok4DSL/dsdevice.c
View file @
91938e44
...
...
@@ -47,7 +47,7 @@
*/
/** @private */
SR_PRIV
struct
sr_channel
*
sr_channel_new
(
in
t
index
,
int
type
,
SR_PRIV
struct
sr_channel
*
sr_channel_new
(
uint16_
t
index
,
int
type
,
gboolean
enabled
,
const
char
*
name
)
{
struct
sr_channel
*
probe
;
...
...
@@ -156,7 +156,7 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum,
*
* @since 0.1.0 (but the API changed in 0.2.0)
*/
SR_API
int
sr_dev_trigger_set
(
const
struct
sr_dev_inst
*
sdi
,
in
t
probenum
,
SR_API
int
sr_dev_trigger_set
(
const
struct
sr_dev_inst
*
sdi
,
uint16_
t
probenum
,
const
char
*
trigger
)
{
GSList
*
l
;
...
...
libsigrok4DSL/hardware/DSL/dscope.c
View file @
91938e44
...
...
@@ -606,7 +606,7 @@ static int init(struct sr_context *sr_ctx)
static
int
set_probes
(
struct
sr_dev_inst
*
sdi
,
int
num_probes
)
{
in
t
j
;
uint16_
t
j
;
struct
sr_channel
*
probe
;
for
(
j
=
0
;
j
<
num_probes
;
j
++
)
{
...
...
@@ -627,7 +627,7 @@ static int set_probes(struct sr_dev_inst *sdi, int num_probes)
static
int
adjust_probes
(
struct
sr_dev_inst
*
sdi
,
int
num_probes
)
{
in
t
j
;
uint16_
t
j
;
GSList
*
l
;
struct
sr_channel
*
probe
;
GSList
*
p
;
...
...
libsigrok4DSL/hardware/DSL/dslogic.c
View file @
91938e44
...
...
@@ -676,7 +676,7 @@ static int init(struct sr_context *sr_ctx)
static
int
set_probes
(
struct
sr_dev_inst
*
sdi
,
int
num_probes
)
{
in
t
j
;
uint16_
t
j
;
struct
sr_channel
*
probe
;
for
(
j
=
0
;
j
<
num_probes
;
j
++
)
{
...
...
@@ -696,7 +696,7 @@ static int set_probes(struct sr_dev_inst *sdi, int num_probes)
static
int
adjust_probes
(
struct
sr_dev_inst
*
sdi
,
int
num_probes
)
{
in
t
j
;
uint16_
t
j
;
GSList
*
l
;
struct
sr_channel
*
probe
;
GSList
*
p
;
...
...
libsigrok4DSL/hardware/demo/demo.c
View file @
91938e44
...
...
@@ -204,7 +204,7 @@ static GSList *hw_scan(GSList *options)
struct
drv_context
*
drvc
;
struct
dev_context
*
devc
;
GSList
*
devices
;
in
t
i
;
uint16_
t
i
;
(
void
)
options
;
...
...
@@ -396,7 +396,8 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
struct
sr_channel
*
ch
,
const
struct
sr_channel_group
*
cg
)
{
int
i
,
ret
;
uint16_t
i
;
int
ret
;
const
char
*
stropt
;
struct
sr_channel
*
probe
;
...
...
libsigrok4DSL/input/in_binary.c
View file @
91938e44
...
...
@@ -53,7 +53,7 @@ static int format_match(const char *filename)
static
int
init
(
struct
sr_input
*
in
,
const
char
*
filename
)
{
struct
sr_channel
*
probe
;
in
t
num_probes
,
i
;
uint16_
t
num_probes
,
i
;
char
name
[
SR_MAX_PROBENAME_LEN
+
1
];
char
*
param
;
struct
context
*
ctx
;
...
...
libsigrok4DSL/input/in_vcd.c
View file @
91938e44
...
...
@@ -319,7 +319,7 @@ static int format_match(const char *filename)
static
int
init
(
struct
sr_input
*
in
,
const
char
*
filename
)
{
struct
sr_channel
*
probe
;
in
t
num_probes
,
i
;
uint16_
t
num_probes
,
i
;
char
name
[
SR_MAX_PROBENAME_LEN
+
1
];
char
*
param
;
struct
context
*
ctx
;
...
...
libsigrok4DSL/libsigrok-internal.h
View file @
91938e44
...
...
@@ -83,7 +83,7 @@ SR_PRIV int sr_err(const char *format, ...);
/*--- device.c --------------------------------------------------------------*/
SR_PRIV
struct
sr_channel
*
sr_channel_new
(
in
t
index
,
int
type
,
SR_PRIV
struct
sr_channel
*
sr_channel_new
(
uint16_
t
index
,
int
type
,
gboolean
enabled
,
const
char
*
name
);
SR_PRIV
void
sr_dev_probes_free
(
struct
sr_dev_inst
*
sdi
);
...
...
libsigrok4DSL/libsigrok.h
View file @
91938e44
...
...
@@ -556,7 +556,7 @@ enum {
struct
sr_channel
{
/* The index field will go: use g_slist_length(sdi->channels) instead. */
in
t
index
;
uint16_
t
index
;
int
type
;
gboolean
enabled
;
char
*
name
;
...
...
libsigrok4DSL/proto.h
View file @
91938e44
...
...
@@ -49,7 +49,7 @@ SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
int
probenum
,
const
char
*
name
);
SR_API
int
sr_dev_probe_enable
(
const
struct
sr_dev_inst
*
sdi
,
int
probenum
,
gboolean
state
);
SR_API
int
sr_dev_trigger_set
(
const
struct
sr_dev_inst
*
sdi
,
in
t
probenum
,
SR_API
int
sr_dev_trigger_set
(
const
struct
sr_dev_inst
*
sdi
,
uint16_
t
probenum
,
const
char
*
trigger
);
SR_API
gboolean
sr_dev_has_option
(
const
struct
sr_dev_inst
*
sdi
,
int
key
);
SR_API
GSList
*
sr_dev_list
(
const
struct
sr_dev_driver
*
driver
);
...
...
libsigrok4DSL/session_file.c
View file @
91938e44
...
...
@@ -121,8 +121,10 @@ SR_API int sr_session_load(const char *filename)
struct
zip_stat
zs
;
struct
sr_dev_inst
*
sdi
;
struct
sr_channel
*
probe
;
int
ret
,
probenum
,
devcnt
,
version
,
i
,
j
;
uint64_t
tmp_u64
,
total_probes
,
enabled_probes
,
p
;
int
ret
,
devcnt
,
i
,
j
;
uint16_t
probenum
;
uint64_t
tmp_u64
,
total_probes
,
enabled_probes
;
uint16_t
p
;
char
**
sections
,
**
keys
,
*
metafile
,
*
val
,
s
[
11
];
char
probename
[
SR_MAX_PROBENAME_LEN
+
1
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment