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
c180b108
Commit
c180b108
authored
Jul 28, 2017
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix conflict issue when read status from hardware
parent
040475c6
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
19 additions
and
50 deletions
+19
-50
DSView/pv/sigsession.cpp
DSView/pv/sigsession.cpp
+1
-1
DSView/pv/storesession.cpp
DSView/pv/storesession.cpp
+1
-1
DSView/pv/view/dsosignal.cpp
DSView/pv/view/dsosignal.cpp
+1
-1
DSView/pv/view/view.cpp
DSView/pv/view/view.cpp
+0
-27
DSView/pv/view/view.h
DSView/pv/view/view.h
+0
-1
libsigrok4DSL/hardware/DSL/dscope.c
libsigrok4DSL/hardware/DSL/dscope.c
+3
-8
libsigrok4DSL/hardware/DSL/dsl.c
libsigrok4DSL/hardware/DSL/dsl.c
+2
-2
libsigrok4DSL/hardware/DSL/dsl.h
libsigrok4DSL/hardware/DSL/dsl.h
+1
-1
libsigrok4DSL/hardware/DSL/dslogic.c
libsigrok4DSL/hardware/DSL/dslogic.c
+2
-2
libsigrok4DSL/hardware/demo/demo.c
libsigrok4DSL/hardware/demo/demo.c
+2
-1
libsigrok4DSL/hwdriver.c
libsigrok4DSL/hwdriver.c
+2
-2
libsigrok4DSL/libsigrok.h
libsigrok4DSL/libsigrok.h
+1
-1
libsigrok4DSL/proto.h
libsigrok4DSL/proto.h
+1
-1
libsigrok4DSL/session_driver.c
libsigrok4DSL/session_driver.c
+2
-1
No files found.
DSView/pv/sigsession.cpp
View file @
c180b108
...
...
@@ -443,7 +443,7 @@ bool SigSession::get_capture_status(bool &triggered, int &progress)
{
uint64_t
sample_limits
=
cur_samplelimits
();
sr_status
status
;
if
(
sr_status_get
(
_dev_inst
->
dev_inst
(),
&
status
,
SR_STATUS_TRIG_BEGIN
,
SR_STATUS_TRIG_END
)
==
SR_OK
){
if
(
sr_status_get
(
_dev_inst
->
dev_inst
(),
&
status
,
true
,
SR_STATUS_TRIG_BEGIN
,
SR_STATUS_TRIG_END
)
==
SR_OK
){
triggered
=
status
.
trig_hit
&
0x01
;
uint64_t
captured_cnt
=
status
.
trig_hit
>>
2
;
captured_cnt
=
((
uint64_t
)
status
.
captured_cnt0
+
...
...
DSView/pv/storesession.cpp
View file @
c180b108
...
...
@@ -344,7 +344,7 @@ QString StoreSession::meta_gen(boost::shared_ptr<data::Snapshot> snapshot)
fprintf
(
meta
,
" vFactor%d = %d
\n
"
,
probe
->
index
,
probe
->
vfactor
);
fprintf
(
meta
,
" vPos%d = %lf
\n
"
,
probe
->
index
,
probe
->
vpos
);
fprintf
(
meta
,
" vTrig%d = %d
\n
"
,
probe
->
index
,
probe
->
trig_value
);
if
(
sr_status_get
(
sdi
,
&
status
,
0
,
0
)
==
SR_OK
)
{
if
(
sr_status_get
(
sdi
,
&
status
,
false
,
0
,
0
)
==
SR_OK
)
{
if
(
probe
->
index
==
0
)
{
fprintf
(
meta
,
" period%d = %"
PRIu64
"
\n
"
,
probe
->
index
,
status
.
ch0_period
);
fprintf
(
meta
,
" pcnt%d = %"
PRIu32
"
\n
"
,
probe
->
index
,
status
.
ch0_pcnt
);
...
...
DSView/pv/view/dsosignal.cpp
View file @
c180b108
...
...
@@ -1343,7 +1343,7 @@ void DsoSignal::paint_measure(QPainter &p)
int
index
=
get_index
();
const
int
st_begin
=
(
index
==
0
)
?
SR_STATUS_CH0_BEGIN
:
SR_STATUS_CH1_BEGIN
;
const
int
st_end
=
(
index
==
0
)
?
SR_STATUS_CH0_END
:
SR_STATUS_CH1_END
;
if
(
sr_status_get
(
_dev_inst
->
dev_inst
(),
&
status
,
st_begin
,
st_end
)
==
SR_OK
)
{
if
(
sr_status_get
(
_dev_inst
->
dev_inst
(),
&
status
,
false
,
st_begin
,
st_end
)
==
SR_OK
)
{
_max
=
(
index
==
0
)
?
status
.
ch0_max
:
status
.
ch1_max
;
_min
=
(
index
==
0
)
?
status
.
ch0_min
:
status
.
ch1_min
;
const
uint64_t
period
=
(
index
==
0
)
?
status
.
ch0_period
:
status
.
ch1_period
;
...
...
DSView/pv/view/view.cpp
View file @
c180b108
...
...
@@ -1129,33 +1129,6 @@ void View::repeat_show()
_viewbottom
->
update
();
}
bool
View
::
get_capture_status
(
bool
&
triggered
,
int
&
progress
)
{
uint64_t
sample_limits
=
_session
.
cur_samplelimits
();
sr_status
status
;
if
(
sr_status_get
(
_session
.
get_device
()
->
dev_inst
(),
&
status
,
SR_STATUS_TRIG_BEGIN
,
SR_STATUS_TRIG_END
)
==
SR_OK
){
triggered
=
status
.
trig_hit
&
0x01
;
const
bool
captured_cnt_dec
=
status
.
trig_hit
&
0x02
;
uint64_t
captured_cnt
=
status
.
trig_hit
>>
2
;
captured_cnt
=
((
uint64_t
)
status
.
captured_cnt0
+
((
uint64_t
)
status
.
captured_cnt1
<<
8
)
+
((
uint64_t
)
status
.
captured_cnt2
<<
16
)
+
((
uint64_t
)
status
.
captured_cnt3
<<
24
)
+
(
captured_cnt
<<
32
));
if
(
_session
.
get_device
()
->
dev_inst
()
->
mode
==
DSO
)
captured_cnt
=
captured_cnt
*
_session
.
get_signals
().
size
()
/
_session
.
get_ch_num
(
SR_CHANNEL_DSO
);
if
(
captured_cnt_dec
)
progress
=
(
sample_limits
-
captured_cnt
)
*
100.0
/
sample_limits
;
else
progress
=
captured_cnt
*
100.0
/
sample_limits
;
return
true
;
}
return
false
;
}
void
View
::
set_capture_status
()
{
bool
triggered
;
...
...
DSView/pv/view/view.h
View file @
c180b108
...
...
@@ -192,7 +192,6 @@ public:
void
viewport_update
();
bool
get_capture_status
(
bool
&
triggered
,
int
&
progress
);
void
set_capture_status
();
bool
get_dso_trig_moved
()
const
;
...
...
libsigrok4DSL/hardware/DSL/dscope.c
View file @
c180b108
...
...
@@ -1633,15 +1633,10 @@ static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
return
ret
;
}
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
)
{
struct
DSL_context
*
devc
=
sdi
->
priv
;
if
(
devc
->
instant
||
devc
->
status
==
DSL_DATA
)
{
int
ret
=
dsl_dev_status_get
(
sdi
,
status
,
begin
,
end
);
return
ret
;
}
else
{
return
FALSE
;
}
int
ret
=
dsl_dev_status_get
(
sdi
,
status
,
prg
,
begin
,
end
);
return
ret
;
}
SR_PRIV
struct
sr_dev_driver
DSCope_driver_info
=
{
...
...
libsigrok4DSL/hardware/DSL/dsl.c
View file @
c180b108
...
...
@@ -1082,7 +1082,7 @@ SR_PRIV int dsl_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_dat
return
SR_OK
;
}
SR_PRIV
int
dsl_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
SR_PRIV
int
dsl_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
)
{
int
ret
=
SR_ERR
;
struct
ctl_rd_cmd
rd_cmd
;
...
...
@@ -1093,7 +1093,7 @@ SR_PRIV int dsl_dev_status_get(const struct sr_dev_inst *sdi, struct sr_status *
devc
=
sdi
->
priv
;
usb
=
sdi
->
conn
;
if
(
devc
->
status
==
DSL_START
)
{
if
(
prg
&&
(
devc
->
status
==
DSL_START
)
)
{
rd_cmd
.
header
.
dest
=
DSL_CTL_DSO_MEASURE
;
rd_cmd
.
header
.
offset
=
begin
;
rd_cmd
.
header
.
size
=
end
-
begin
+
1
;
...
...
libsigrok4DSL/hardware/DSL/dsl.h
View file @
c180b108
...
...
@@ -418,7 +418,7 @@ SR_PRIV int dsl_config_get(int id, GVariant **data, const struct sr_dev_inst *sd
SR_PRIV
int
dsl_dev_open
(
struct
sr_dev_driver
*
di
,
struct
sr_dev_inst
*
sdi
,
gboolean
*
fpga_done
);
SR_PRIV
int
dsl_dev_close
(
struct
sr_dev_inst
*
sdi
);
SR_PRIV
int
dsl_dev_acquisition_stop
(
const
struct
sr_dev_inst
*
sdi
,
void
*
cb_data
);
SR_PRIV
int
dsl_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
);
SR_PRIV
int
dsl_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
);
SR_PRIV
unsigned
int
dsl_get_timeout
(
struct
DSL_context
*
devc
);
SR_PRIV
int
dsl_start_transfers
(
const
struct
sr_dev_inst
*
sdi
);
...
...
libsigrok4DSL/hardware/DSL/dslogic.c
View file @
c180b108
...
...
@@ -1498,9 +1498,9 @@ static int dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
return
ret
;
}
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
)
{
int
ret
=
dsl_dev_status_get
(
sdi
,
status
,
begin
,
end
);
int
ret
=
dsl_dev_status_get
(
sdi
,
status
,
prg
,
begin
,
end
);
return
ret
;
}
...
...
libsigrok4DSL/hardware/demo/demo.c
View file @
c180b108
...
...
@@ -1179,8 +1179,9 @@ static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data)
return
SR_OK
;
}
static
int
hw_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
static
int
hw_dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
)
{
(
void
)
prg
;
(
void
)
begin
;
(
void
)
end
;
if
(
sdi
)
{
...
...
libsigrok4DSL/hwdriver.c
View file @
c180b108
...
...
@@ -415,7 +415,7 @@ SR_API const struct sr_config_info *sr_config_info_get(int key)
*/
SR_API
int
sr_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
gboolean
prg
,
int
begin
,
int
end
)
{
int
ret
;
...
...
@@ -424,7 +424,7 @@ SR_API int sr_status_get(const struct sr_dev_inst *sdi,
else
if
(
!
sdi
->
driver
->
dev_status_get
)
ret
=
SR_ERR_ARG
;
else
ret
=
sdi
->
driver
->
dev_status_get
(
sdi
,
status
,
begin
,
end
);
ret
=
sdi
->
driver
->
dev_status_get
(
sdi
,
status
,
prg
,
begin
,
end
);
return
ret
;
}
...
...
libsigrok4DSL/libsigrok.h
View file @
c180b108
...
...
@@ -1084,7 +1084,7 @@ struct sr_dev_driver {
int
(
*
dev_close
)
(
struct
sr_dev_inst
*
sdi
);
int
(
*
dev_status_get
)
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
);
gboolean
prg
,
int
begin
,
int
end
);
int
(
*
dev_acquisition_start
)
(
struct
sr_dev_inst
*
sdi
,
void
*
cb_data
);
int
(
*
dev_acquisition_stop
)
(
const
struct
sr_dev_inst
*
sdi
,
...
...
libsigrok4DSL/proto.h
View file @
c180b108
...
...
@@ -79,7 +79,7 @@ SR_API int sr_config_list(const struct sr_dev_driver *driver,
int
key
,
GVariant
**
data
);
SR_API
const
struct
sr_config_info
*
sr_config_info_get
(
int
key
);
SR_API
const
struct
sr_config_info
*
sr_config_info_name_get
(
const
char
*
optname
);
SR_API
int
sr_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
);
SR_API
int
sr_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
);
/*--- session.c -------------------------------------------------------------*/
...
...
libsigrok4DSL/session_driver.c
View file @
c180b108
...
...
@@ -624,8 +624,9 @@ static int config_list(int key, GVariant **data,
return
SR_OK
;
}
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
int
begin
,
int
end
)
static
int
dev_status_get
(
const
struct
sr_dev_inst
*
sdi
,
struct
sr_status
*
status
,
gboolean
prg
,
int
begin
,
int
end
)
{
(
void
)
prg
;
(
void
)
begin
;
(
void
)
end
;
...
...
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