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
5dccc919
Commit
5dccc919
authored
Dec 03, 2015
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor issues of display
parent
c4a6870b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
+17
-9
DSView/pv/view/decodetrace.cpp
DSView/pv/view/decodetrace.cpp
+4
-2
DSView/pv/view/viewport.cpp
DSView/pv/view/viewport.cpp
+10
-5
DSView/pv/view/viewport.h
DSView/pv/view/viewport.h
+1
-0
libsigrok4DSL/hardware/DSL/dsl.h
libsigrok4DSL/hardware/DSL/dsl.h
+2
-2
No files found.
DSView/pv/view/decodetrace.cpp
View file @
5dccc919
...
...
@@ -710,8 +710,10 @@ QComboBox* DecodeTrace::create_probe_selector(
{
selector
->
addItem
(
s
->
get_name
(),
qVariantFromValue
((
void
*
)
s
.
get
()));
if
((
*
probe_iter
).
second
==
s
)
selector
->
setCurrentIndex
(
i
+
1
);
if
(
probe_iter
!=
dec
->
channels
().
end
())
{
if
((
*
probe_iter
).
second
->
get_index
()
==
s
->
get_index
())
selector
->
setCurrentIndex
(
i
+
1
);
}
}
}
...
...
DSView/pv/view/viewport.cpp
View file @
5dccc919
...
...
@@ -381,10 +381,11 @@ void Viewport::mousePressEvent(QMouseEvent *event)
const
double
samples_per_pixel
=
_view
.
session
().
get_device
()
->
get_sample_rate
()
*
_view
.
scale
();
while
(
i
!=
_view
.
get_cursorList
().
end
())
{
cursorX
=
(
*
i
)
->
index
()
/
samples_per_pixel
-
(
_view
.
offset
()
/
_view
.
scale
());
if
((
*
i
)
->
grabbed
())
if
((
*
i
)
->
grabbed
())
{
_view
.
get_ruler
()
->
rel_grabbed_cursor
();
else
if
(
qAbs
(
cursorX
-
event
->
pos
().
x
())
<=
HitCursorMargin
)
{
}
else
if
(
qAbs
(
cursorX
-
event
->
pos
().
x
())
<=
HitCursorMargin
)
{
_view
.
get_ruler
()
->
set_grabbed_cursor
(
*
i
);
_measure_type
=
LOGIC_CURS
;
break
;
}
i
++
;
...
...
@@ -521,7 +522,8 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
if
(
_drag_sig
)
_drag_sig
.
reset
();
if
(
_view
.
session
().
get_device
()
->
dev_inst
()
->
mode
==
LOGIC
&&
if
((
_measure_type
!=
LOGIC_MOVE
&&
_measure_type
!=
LOGIC_CURS
)
&&
_view
.
session
().
get_device
()
->
dev_inst
()
->
mode
==
LOGIC
&&
_mouse_down_point
.
x
()
==
event
->
pos
().
x
()
&&
event
->
button
()
&
Qt
::
LeftButton
)
{
if
(
_measure_type
==
LOGIC_EDGE
)
{
...
...
@@ -529,14 +531,14 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
_measure_shown
=
false
;
_edge_rising
=
0
;
_edge_falling
=
0
;
}
else
if
(
_measure_type
!=
LOGIC_MOVE
)
{
}
else
{
_measure_type
=
LOGIC_EDGE
;
_edge_start
=
(
_view
.
offset
()
+
(
event
->
pos
().
x
()
+
0.5
)
*
_view
.
scale
())
*
_view
.
session
().
get_device
()
->
get_sample_rate
();
}
}
if
(
_view
.
session
().
get_device
()
->
dev_inst
()
->
mode
==
LOGIC
&&
_measure_type
!=
LOGIC_EDGE
)
{
(
_measure_type
==
NO_MEASURE
||
_measure_type
==
LOGIC_MOVE
)
)
{
const
double
strength
=
_drag_strength
*
DragTimerInterval
*
1.0
/
_time
.
elapsed
();
if
(
_time
.
elapsed
()
<
200
&&
abs
(
_drag_strength
)
<
MinorDragOffsetUp
&&
...
...
@@ -556,6 +558,9 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
}
}
if
(
!
_view
.
get_ruler
()
->
get_grabbed_cursor
()
&&
_measure_type
==
LOGIC_CURS
)
_measure_type
=
NO_MEASURE
;
update
();
}
...
...
DSView/pv/view/viewport.h
View file @
5dccc919
...
...
@@ -59,6 +59,7 @@ public:
LOGIC_FREQ
,
LOGIC_EDGE
,
LOGIC_MOVE
,
LOGIC_CURS
,
DSO_FREQ
};
...
...
libsigrok4DSL/hardware/DSL/dsl.h
View file @
5dccc919
...
...
@@ -61,8 +61,8 @@
#define MAX_ANALOG_PROBES_NUM 9
#define MAX_DSO_PROBES_NUM 2
#define DEFAULT_SAMPLERATE SR_MHZ(1
00
)
#define DEFAULT_SAMPLELIMIT SR_MB(1
6
)
#define DEFAULT_SAMPLERATE SR_MHZ(1)
#define DEFAULT_SAMPLELIMIT SR_MB(1)
#define VPOS_MINISTEP 0.083
#define VPOS_STEP 26.0
...
...
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