Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
dsview
Commits
3a71ddd7
Commit
3a71ddd7
authored
7 years ago
by
DreamSourceLab
Browse files
Options
Download
Email Patches
Plain Diff
Warnings fix
parent
f87f5a23
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
15 deletions
+24
-15
DSView/pv/data/decoderstack.cpp
DSView/pv/data/decoderstack.cpp
+4
-2
DSView/pv/data/logicsnapshot.cpp
DSView/pv/data/logicsnapshot.cpp
+2
-2
DSView/pv/data/logicsnapshot.h
DSView/pv/data/logicsnapshot.h
+4
-4
DSView/pv/prop/bool.cpp
DSView/pv/prop/bool.cpp
+2
-1
DSView/pv/prop/double.cpp
DSView/pv/prop/double.cpp
+2
-1
DSView/pv/prop/enum.cpp
DSView/pv/prop/enum.cpp
+4
-2
DSView/pv/toolbars/samplingbar.cpp
DSView/pv/toolbars/samplingbar.cpp
+2
-1
DSView/pv/view/header.cpp
DSView/pv/view/header.cpp
+2
-1
DSView/pv/view/ruler.cpp
DSView/pv/view/ruler.cpp
+2
-1
No files found.
DSView/pv/data/decoderstack.cpp
View file @
3a71ddd7
...
...
@@ -627,8 +627,9 @@ void DecoderStack::decode_proc()
_error_message
=
QString
::
fromLocal8Bit
(
error
);
// Destroy the session
if
(
error
)
if
(
error
)
{
g_free
(
error
);
}
srd_session_destroy
(
session
);
_decode_state
=
Stopped
;
...
...
@@ -657,8 +658,9 @@ void DecoderStack::annotation_callback(srd_proto_data *pdata, void *decoder)
//lock_guard<mutex> lock(d->_output_mutex);
if
(
d
->
_no_memory
)
if
(
d
->
_no_memory
)
{
return
;
}
const
Annotation
a
(
pdata
);
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/data/logicsnapshot.cpp
View file @
3a71ddd7
...
...
@@ -578,7 +578,7 @@ bool LogicSnapshot::get_nxt_edge(
return
false
;
//const unsigned int min_level = max((int)floorf(logf(min_length) / logf(Scale)) - 1, 0);
const
unsigned
int
min_level
=
max
((
int
)(
log2f
(
min_length
)
-
1
)
/
ScalePower
,
0
);
const
unsigned
int
min_level
=
max
((
int
)(
log2f
(
min_length
)
-
1
)
/
(
int
)
ScalePower
,
0
);
uint64_t
root_index
=
index
>>
(
LeafBlockPower
+
RootScalePower
);
uint8_t
root_pos
=
(
index
&
RootMask
)
>>
LeafBlockPower
;
bool
edge_hit
=
false
;
...
...
@@ -623,7 +623,7 @@ bool LogicSnapshot::get_pre_edge(uint64_t &index, bool last_sample,
return
false
;
//const unsigned int min_level = max((int)floorf(logf(min_length) / logf(Scale)) - 1, 1);
const
unsigned
int
min_level
=
max
((
int
)(
log2f
(
min_length
)
-
1
)
/
ScalePower
,
0
);
const
unsigned
int
min_level
=
max
((
int
)(
log2f
(
min_length
)
-
1
)
/
(
int
)
ScalePower
,
0
);
int
root_index
=
index
>>
(
LeafBlockPower
+
RootScalePower
);
uint8_t
root_pos
=
(
index
&
RootMask
)
>>
LeafBlockPower
;
bool
edge_hit
=
false
;
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/data/logicsnapshot.h
View file @
3a71ddd7
...
...
@@ -45,11 +45,11 @@ namespace data {
class
LogicSnapshot
:
public
Snapshot
{
private:
static
const
int
ScaleLevel
=
4
;
static
const
int
ScalePower
=
6
;
static
const
u
int
64_t
ScaleLevel
=
4
;
static
const
u
int
64_t
ScalePower
=
6
;
static
const
uint64_t
Scale
=
1
<<
ScalePower
;
static
const
int
ScaleSize
=
Scale
/
8
;
static
const
int
RootScalePower
=
ScalePower
;
static
const
u
int
64_t
ScaleSize
=
Scale
/
8
;
static
const
u
int
64_t
RootScalePower
=
ScalePower
;
static
const
uint64_t
RootScale
=
1
<<
RootScalePower
;
static
const
uint64_t
LeafBlockSpace
=
(
Scale
+
Scale
*
Scale
+
Scale
*
Scale
*
Scale
+
Scale
*
Scale
*
Scale
*
Scale
)
/
8
;
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/prop/bool.cpp
View file @
3a71ddd7
...
...
@@ -57,9 +57,10 @@ QWidget* Bool::get_widget(QWidget *parent, bool auto_commit)
g_variant_unref
(
value
);
}
if
(
auto_commit
)
if
(
auto_commit
)
{
connect
(
_check_box
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
on_state_changed
(
int
)));
}
return
_check_box
;
}
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/prop/double.cpp
View file @
3a71ddd7
...
...
@@ -72,9 +72,10 @@ QWidget* Double::get_widget(QWidget *parent, bool auto_commit)
g_variant_unref
(
value
);
}
if
(
auto_commit
)
if
(
auto_commit
)
{
connect
(
_spin_box
,
SIGNAL
(
valueChanged
(
double
)),
this
,
SLOT
(
on_value_changed
(
double
)));
}
return
_spin_box
;
}
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/prop/enum.cpp
View file @
3a71ddd7
...
...
@@ -57,8 +57,9 @@ QWidget* Enum::get_widget(QWidget *parent, bool auto_commit)
return
_selector
;
GVariant
*
const
value
=
_getter
?
_getter
()
:
NULL
;
if
(
!
value
)
if
(
!
value
)
{
return
NULL
;
}
_selector
=
new
QComboBox
(
parent
);
_selector
->
setSizeAdjustPolicy
(
QComboBox
::
AdjustToContents
);
...
...
@@ -72,9 +73,10 @@ QWidget* Enum::get_widget(QWidget *parent, bool auto_commit)
g_variant_unref
(
value
);
if
(
auto_commit
)
if
(
auto_commit
)
{
connect
(
_selector
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
on_current_item_changed
(
int
)));
}
return
_selector
;
}
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/toolbars/samplingbar.cpp
View file @
3a71ddd7
...
...
@@ -512,8 +512,9 @@ void SamplingBar::commit_sample_rate()
sample_rate
=
_sample_rate
.
itemData
(
index
).
value
<
uint64_t
>
();
if
(
sample_rate
==
0
)
if
(
sample_rate
==
0
)
{
return
;
}
get_selected_device
()
->
set_config
(
NULL
,
NULL
,
SR_CONF_SAMPLERATE
,
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/view/header.cpp
View file @
3a71ddd7
...
...
@@ -163,8 +163,9 @@ void Header::mousePressEvent(QMouseEvent *event)
_view
.
get_traces
(
ALL_VIEW
));
int
action
;
const
bool
instant
=
_view
.
session
().
get_instant
();
if
(
instant
&&
_view
.
session
().
get_capture_state
()
==
SigSession
::
Running
)
if
(
instant
&&
_view
.
session
().
get_capture_state
()
==
SigSession
::
Running
)
{
return
;
}
if
(
event
->
button
()
&
Qt
::
LeftButton
)
{
_mouse_down_point
=
event
->
pos
();
...
...
This diff is collapsed.
Click to expand it.
DSView/pv/view/ruler.cpp
View file @
3a71ddd7
...
...
@@ -194,8 +194,9 @@ void Ruler::paintEvent(QPaintEvent*)
draw_hover_mark
(
p
);
// Draw cursor selection
if
(
_cursor_sel_visible
||
_cursor_go_visible
)
if
(
_cursor_sel_visible
||
_cursor_go_visible
)
{
draw_cursor_sel
(
p
);
}
p
.
end
();
}
...
...
This diff is collapsed.
Click to expand it.
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