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
0d581e10
Commit
0d581e10
authored
Jul 24, 2017
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix minor display issues
parent
ec3dc106
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
32 deletions
+34
-32
DSView/pv/data/decoderstack.cpp
DSView/pv/data/decoderstack.cpp
+6
-6
DSView/pv/data/logicsnapshot.cpp
DSView/pv/data/logicsnapshot.cpp
+13
-9
DSView/pv/dialogs/about.cpp
DSView/pv/dialogs/about.cpp
+3
-0
DSView/pv/dialogs/search.cpp
DSView/pv/dialogs/search.cpp
+3
-3
DSView/pv/dock/triggerdock.cpp
DSView/pv/dock/triggerdock.cpp
+1
-1
DSView/pv/view/decodetrace.cpp
DSView/pv/view/decodetrace.cpp
+2
-1
DSView/pv/view/ruler.cpp
DSView/pv/view/ruler.cpp
+4
-0
DSView/pv/view/view.cpp
DSView/pv/view/view.cpp
+2
-2
libsigrok4DSL/hardware/DSL/dscope.c
libsigrok4DSL/hardware/DSL/dscope.c
+0
-2
libsigrok4DSL/hardware/DSL/dslogic.c
libsigrok4DSL/hardware/DSL/dslogic.c
+0
-8
No files found.
DSView/pv/data/decoderstack.cpp
View file @
0d581e10
...
...
@@ -50,7 +50,7 @@ const int64_t DecoderStack::DecodeChunkLength = 4 * 1024;
//const int64_t DecoderStack::DecodeChunkLength = 1024 * 1024;
const
unsigned
int
DecoderStack
::
DecodeNotifyPeriod
=
1024
;
mutex
DecoderStack
::
_global_decode_mutex
;
boost
::
mutex
DecoderStack
::
_global_decode_mutex
;
DecoderStack
::
DecoderStack
(
pv
::
SigSession
&
session
,
const
srd_decoder
*
const
dec
)
:
...
...
@@ -179,7 +179,7 @@ void DecoderStack::build_row()
int64_t
DecoderStack
::
samples_decoded
()
const
{
lock_guard
<
boost
::
recursive_mutex
>
decode_lock
(
_output_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
decode_lock
(
_output_mutex
);
return
_samples_decoded
;
}
...
...
@@ -289,7 +289,7 @@ bool DecoderStack::has_annotations(const Row &row) const
uint64_t
DecoderStack
::
list_annotation_size
()
const
{
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_output_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_output_mutex
);
uint64_t
max_annotation_size
=
0
;
for
(
map
<
const
Row
,
RowData
>::
const_iterator
i
=
_rows
.
begin
();
i
!=
_rows
.
end
();
i
++
)
{
...
...
@@ -555,7 +555,7 @@ void DecoderStack::decode_data(
}
{
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_output_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_output_mutex
);
_samples_decoded
=
i
-
decode_start
+
1
;
}
...
...
@@ -572,7 +572,7 @@ void DecoderStack::decode_data(
void
DecoderStack
::
decode_proc
()
{
lock_guard
<
mutex
>
decode_lock
(
_global_decode_mutex
);
boost
::
lock_guard
<
boost
::
mutex
>
decode_lock
(
_global_decode_mutex
);
optional
<
uint64_t
>
sample_count
;
srd_session
*
session
;
...
...
@@ -693,7 +693,7 @@ void DecoderStack::annotation_callback(srd_proto_data *pdata, void *decoder)
}
// Add the annotation
lock_guard
<
boost
::
recursive_mutex
>
lock
(
d
->
_output_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
d
->
_output_mutex
);
if
(
!
(
*
row_iter
).
second
.
push_annotation
(
a
))
d
->
_no_memory
=
true
;
}
...
...
DSView/pv/data/logicsnapshot.cpp
View file @
0d581e10
...
...
@@ -495,18 +495,22 @@ bool LogicSnapshot::get_sample(uint64_t index, int sig_index)
int
order
=
get_ch_order
(
sig_index
);
assert
(
order
!=
-
1
);
assert
(
_ch_data
[
order
].
size
()
!=
0
);
assert
(
index
<
get_sample_count
());
//
assert(index < get_sample_count());
uint64_t
index_mask
=
1ULL
<<
(
index
&
LevelMask
[
0
]);
uint64_t
root_index
=
index
>>
(
LeafBlockPower
+
RootScalePower
);
uint8_t
root_pos
=
(
index
&
RootMask
)
>>
LeafBlockPower
;
uint64_t
root_pos_mask
=
1ULL
<<
root_pos
;
if
(
index
<
get_sample_count
())
{
uint64_t
index_mask
=
1ULL
<<
(
index
&
LevelMask
[
0
]);
uint64_t
root_index
=
index
>>
(
LeafBlockPower
+
RootScalePower
);
uint8_t
root_pos
=
(
index
&
RootMask
)
>>
LeafBlockPower
;
uint64_t
root_pos_mask
=
1ULL
<<
root_pos
;
if
((
_ch_data
[
order
][
root_index
].
tog
&
root_pos_mask
)
==
0
)
{
return
(
_ch_data
[
order
][
root_index
].
value
&
root_pos_mask
)
!=
0
;
if
((
_ch_data
[
order
][
root_index
].
tog
&
root_pos_mask
)
==
0
)
{
return
(
_ch_data
[
order
][
root_index
].
value
&
root_pos_mask
)
!=
0
;
}
else
{
uint64_t
*
lbp
=
(
uint64_t
*
)
_ch_data
[
order
][
root_index
].
lbp
[
root_pos
];
return
*
(
lbp
+
((
index
&
LeafMask
)
>>
ScalePower
))
&
index_mask
;
}
}
else
{
uint64_t
*
lbp
=
(
uint64_t
*
)
_ch_data
[
order
][
root_index
].
lbp
[
root_pos
];
return
*
(
lbp
+
((
index
&
LeafMask
)
>>
ScalePower
))
&
index_mask
;
return
false
;
}
}
...
...
DSView/pv/dialogs/about.cpp
View file @
0d581e10
...
...
@@ -28,6 +28,7 @@
#include <QDir>
#include <QTextStream>
#include <QScrollBar>
#include <QTextCodec>
#include "about.h"
...
...
@@ -68,7 +69,9 @@ About::About(QWidget *parent) :
QString
filename
=
dir
.
absolutePath
()
+
"/NEWS"
;
QFile
news
(
filename
);
if
(
news
.
open
(
QIODevice
::
ReadOnly
))
{
QTextCodec
*
code
=
QTextCodec
::
codecForName
(
"UTF-8"
);
QTextStream
stream
(
&
news
);
stream
.
setCodec
(
code
);
QString
line
;
while
(
!
stream
.
atEnd
()){
line
=
stream
.
readLine
();
...
...
DSView/pv/dialogs/search.cpp
View file @
0d581e10
...
...
@@ -56,8 +56,8 @@ Search::Search(QWidget *parent, SigSession &session, std::map<uint16_t, QString>
boost
::
shared_ptr
<
view
::
LogicSignal
>
logic_sig
;
if
(
logic_sig
=
boost
::
dynamic_pointer_cast
<
view
::
LogicSignal
>
(
sig
))
{
QLineEdit
*
search_lineEdit
=
new
QLineEdit
(
this
);
if
(
pattern
.
find
(
index
)
!=
pattern
.
end
())
search_lineEdit
->
setText
(
pattern
[
index
]);
if
(
pattern
.
find
(
logic_sig
->
get_index
()
)
!=
pattern
.
end
())
search_lineEdit
->
setText
(
pattern
[
logic_sig
->
get_index
()
]);
else
search_lineEdit
->
setText
(
"X"
);
search_lineEdit
->
setValidator
(
value_validator
);
...
...
@@ -116,7 +116,7 @@ std::map<uint16_t, QString> Search::get_pattern()
assert
(
sig
);
boost
::
shared_ptr
<
view
::
LogicSignal
>
logic_sig
;
if
(
logic_sig
=
boost
::
dynamic_pointer_cast
<
view
::
LogicSignal
>
(
sig
))
{
pattern
[
index
]
=
_search_lineEdit_vec
[
index
]
->
text
();
pattern
[
logic_sig
->
get_index
()
]
=
_search_lineEdit_vec
[
index
]
->
text
();
index
++
;
}
}
...
...
DSView/pv/dock/triggerdock.cpp
View file @
0d581e10
...
...
@@ -254,7 +254,7 @@ TriggerDock::TriggerDock(QWidget *parent, SigSession &session) :
gLayout
->
addWidget
(
adv_radioButton
,
1
,
0
);
gLayout
->
addWidget
(
position_label
,
2
,
0
);
gLayout
->
addWidget
(
position_spinBox
,
2
,
1
);
gLayout
->
addWidget
(
new
QLabel
(
_widget
),
2
,
2
);
gLayout
->
addWidget
(
new
QLabel
(
tr
(
"%"
),
_widget
),
2
,
2
);
gLayout
->
addWidget
(
position_slider
,
3
,
0
,
1
,
3
);
gLayout
->
addWidget
(
stages_label
,
4
,
0
);
gLayout
->
addWidget
(
stages_comboBox
,
4
,
1
);
...
...
DSView/pv/view/decodetrace.cpp
View file @
0d581e10
...
...
@@ -301,7 +301,8 @@ void DecodeTrace::paint_mid(QPainter &p, int left, int right)
const
uint64_t
max_annotation
=
_decoder_stack
->
get_max_annotation
(
row
);
const
double
max_annWidth
=
max_annotation
/
samples_per_pixel
;
if
((
max_annWidth
>
10
&&
min_annWidth
>
1
)
||
if
((
max_annWidth
>
100
)
||
(
max_annWidth
>
10
&&
min_annWidth
>
1
)
||
(
max_annWidth
==
0
&&
samples_per_pixel
<
10
))
{
vector
<
Annotation
>
annotations
;
_decoder_stack
->
get_annotation_subset
(
annotations
,
row
,
...
...
DSView/pv/view/ruler.cpp
View file @
0d581e10
...
...
@@ -297,6 +297,10 @@ void Ruler::mouseReleaseEvent(QMouseEvent *event)
_curs_moved
=
false
;
_view
.
cursor_moved
();
}
if
(
_hitCursor
&&
!
_grabbed_marker
)
{
_hitCursor
=
false
;
}
}
if
(
event
->
button
()
&
Qt
::
RightButton
)
{
...
...
DSView/pv/view/view.cpp
View file @
0d581e10
...
...
@@ -578,7 +578,7 @@ void View::update_scroll()
}
else
{
horizontalScrollBar
()
->
setRange
(
0
,
MaxScrollValue
);
horizontalScrollBar
()
->
setSliderPosition
(
_offset
*
MaxScrollValue
/
length
);
_offset
*
1.0
/
length
*
MaxScrollValue
);
}
_updating_scroll
=
false
;
...
...
@@ -824,7 +824,7 @@ void View::h_scroll_value_changed(int value)
int64_t
length
=
0
;
int64_t
offset
=
0
;
get_scroll_layout
(
length
,
offset
);
_offset
=
floor
(
length
*
value
/
MaxScrollValue
);
_offset
=
floor
(
value
*
1.0
/
MaxScrollValue
*
length
);
}
_offset
=
max
(
min
(
_offset
,
get_max_offset
()),
get_min_offset
());
...
...
libsigrok4DSL/hardware/DSL/dscope.c
View file @
0d581e10
...
...
@@ -24,8 +24,6 @@
#include "dsl.h"
#include "command.h"
#undef min
#define min(a,b) ((a)<(b)?(a):(b))
static
struct
sr_dev_mode
mode_list
[]
=
{
{
"OSC"
,
DSO
},
...
...
libsigrok4DSL/hardware/DSL/dslogic.c
View file @
0d581e10
...
...
@@ -24,14 +24,6 @@
#include "dsl.h"
#include "command.h"
#undef min
#define min(a,b) ((a)<(b)?(a):(b))
#undef max
#define max(a,b) ((a)>(b)?(a):(b))
static
const
unsigned
int
single_buffer_time
=
20
;
static
const
unsigned
int
total_buffer_time
=
100
;
static
const
unsigned
int
instant_buffer_size
=
1024
*
1024
;
static
struct
sr_dev_mode
mode_list
[]
=
{
{
"LA"
,
LOGIC
},
...
...
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