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
ceda90ae
Commit
ceda90ae
authored
Dec 14, 2015
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix language support issue
parent
6c7101c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
26 deletions
+15
-26
DSView/pv/dialogs/deviceoptions.cpp
DSView/pv/dialogs/deviceoptions.cpp
+6
-6
DSView/pv/prop/string.cpp
DSView/pv/prop/string.cpp
+1
-1
DSView/pv/view/view.cpp
DSView/pv/view/view.cpp
+2
-4
DSView/res/DSCope.bin
DSView/res/DSCope.bin
+0
-0
libsigrok4DSL/hardware/DSL/dslogic.c
libsigrok4DSL/hardware/DSL/dslogic.c
+6
-15
No files found.
DSView/pv/dialogs/deviceoptions.cpp
View file @
ceda90ae
...
...
@@ -72,7 +72,7 @@ DeviceOptions::DeviceOptions(QWidget *parent, boost::shared_ptr<pv::device::DevI
GVariant
*
gvar
=
_dev_inst
->
get_config
(
NULL
,
NULL
,
SR_CONF_OPERATION_MODE
);
if
(
gvar
!=
NULL
)
{
_mode
=
g_variant_get_string
(
gvar
,
NULL
);
_mode
=
QString
::
fromUtf8
(
g_variant_get_string
(
gvar
,
NULL
)
);
g_variant_unref
(
gvar
);
}
connect
(
&
_mode_check
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
mode_check
()));
...
...
@@ -124,7 +124,7 @@ QWidget* DeviceOptions::get_property_form()
{
assert
(
p
);
const
QString
label
=
p
->
labeled_widget
()
?
QString
()
:
p
->
name
();
if
(
label
==
"Operation Mode"
)
if
(
label
==
tr
(
"Operation Mode"
)
)
layout
->
addRow
(
label
,
p
->
get_widget
(
form
,
true
));
else
layout
->
addRow
(
label
,
p
->
get_widget
(
form
));
...
...
@@ -159,7 +159,7 @@ void DeviceOptions::setup_probes()
const
char
**
const
options
=
g_variant_get_strv
(
gvar_opts
,
&
num_opts
);
GVariant
*
gvar
=
_dev_inst
->
get_config
(
NULL
,
NULL
,
SR_CONF_CHANNEL_MODE
);
if
(
gvar
!=
NULL
)
{
ch_mode
=
g_variant_get_string
(
gvar
,
NULL
);
ch_mode
=
QString
::
fromUtf8
(
g_variant_get_string
(
gvar
,
NULL
)
);
g_variant_unref
(
gvar
);
for
(
unsigned
int
i
=
0
;
i
<
num_opts
;
i
++
){
...
...
@@ -167,7 +167,7 @@ void DeviceOptions::setup_probes()
_probes_box_layout
.
addWidget
(
ch_opts
,
row0
,
col
,
1
,
8
);
connect
(
ch_opts
,
SIGNAL
(
pressed
()),
this
,
SLOT
(
channel_check
()));
row0
++
;
if
(
QString
::
from
Local8Bit
(
options
[
i
])
==
ch_mode
)
if
(
QString
::
from
Utf8
(
options
[
i
])
==
ch_mode
)
ch_opts
->
setChecked
(
true
);
}
}
...
...
@@ -247,7 +247,7 @@ void DeviceOptions::mode_check()
QString
mode
;
GVariant
*
gvar
=
_dev_inst
->
get_config
(
NULL
,
NULL
,
SR_CONF_OPERATION_MODE
);
if
(
gvar
!=
NULL
)
{
mode
=
g_variant_get_string
(
gvar
,
NULL
);
mode
=
QString
::
fromUtf8
(
g_variant_get_string
(
gvar
,
NULL
)
);
g_variant_unref
(
gvar
);
if
(
mode
!=
_mode
)
{
...
...
@@ -276,7 +276,7 @@ void DeviceOptions::channel_check()
{
QRadioButton
*
sc
=
dynamic_cast
<
QRadioButton
*>
(
sender
());
if
(
sc
!=
NULL
)
_dev_inst
->
set_config
(
NULL
,
NULL
,
SR_CONF_CHANNEL_MODE
,
g_variant_new_string
(
sc
->
text
().
to
Local8Bit
()));
_dev_inst
->
set_config
(
NULL
,
NULL
,
SR_CONF_CHANNEL_MODE
,
g_variant_new_string
(
sc
->
text
().
to
Utf8
().
data
()));
setup_probes
();
}
...
...
DSView/pv/prop/string.cpp
View file @
ceda90ae
...
...
@@ -64,7 +64,7 @@ void String::commit()
if
(
!
_line_edit
)
return
;
QByteArray
ba
=
_line_edit
->
text
().
toLocal8Bit
();
QByteArray
ba
=
_line_edit
->
text
().
toUtf8
();
_setter
(
g_variant_new_string
(
ba
.
data
()));
}
...
...
DSView/pv/view/view.cpp
View file @
ceda90ae
...
...
@@ -227,10 +227,8 @@ void View::zoom(double steps, int offset)
}
}
if
(
_session
.
get_device
()
->
dev_inst
()
->
mode
!=
DSO
)
{
_offset
=
cursor_offset
-
_scale
*
offset
;
_offset
=
max
(
min
(
_offset
,
get_max_offset
()),
get_min_offset
());
}
_offset
=
cursor_offset
-
_scale
*
offset
;
_offset
=
max
(
min
(
_offset
,
get_max_offset
()),
get_min_offset
());
if
(
_scale
!=
_preScale
||
_offset
!=
_preOffset
)
{
_header
->
update
();
...
...
DSView/res/DSCope.bin
View file @
ceda90ae
No preview for this file type
libsigrok4DSL/hardware/DSL/dslogic.c
View file @
ceda90ae
...
...
@@ -347,6 +347,12 @@ static int fpga_setting(const struct sr_dev_inst *sdi)
if
(
channel_en_cnt
==
0
)
channel_en_cnt
=
1
;
devc
->
rle_mode
=
FALSE
;
if
(
sdi
->
mode
==
LOGIC
&&
!
devc
->
stream
&&
devc
->
limit_samples
>
DSLOGIC_MAX_LOGIC_DEPTH
*
ceil
(
devc
->
cur_samplerate
*
1
.
0
/
DSLOGIC_MAX_LOGIC_SAMPLERATE
))
devc
->
rle_mode
=
TRUE
;
//setting.mode = (test_mode ? 0x8000 : 0x0000) + trigger->trigger_en + (sdi->mode << 4);
setting
.
mode
=
((
devc
->
op_mode
==
SR_OP_INTERNAL_TEST
)
<<
15
)
+
((
devc
->
op_mode
==
SR_OP_EXTERNAL_TEST
)
<<
14
)
+
...
...
@@ -1435,12 +1441,6 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
ret
=
command_dso_ctrl
(
usb
->
devhdl
,
dso_cmd_gen
(
sdi
,
0
,
SR_CONF_SAMPLERATE
));
}
else
{
devc
->
sample_wide
=
(
devc
->
cur_samplerate
<=
DSLOGIC_MAX_LOGIC_SAMPLERATE
);
if
(
!
devc
->
stream
)
{
if
(
devc
->
limit_samples
>
DSLOGIC_MAX_LOGIC_DEPTH
*
ceil
(
devc
->
cur_samplerate
*
1
.
0
/
DSLOGIC_MAX_LOGIC_SAMPLERATE
))
devc
->
rle_mode
=
TRUE
;
else
devc
->
rle_mode
=
FALSE
;
}
ret
=
SR_OK
;
}
}
else
if
(
id
==
SR_CONF_CLOCK_TYPE
)
{
...
...
@@ -1471,14 +1471,6 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
ret
=
SR_OK
;
}
else
if
(
id
==
SR_CONF_LIMIT_SAMPLES
)
{
devc
->
limit_samples
=
g_variant_get_uint64
(
data
);
if
(
sdi
->
mode
==
LOGIC
)
{
if
(
!
devc
->
stream
)
{
if
(
devc
->
limit_samples
>
DSLOGIC_MAX_LOGIC_DEPTH
*
ceil
(
devc
->
cur_samplerate
*
1
.
0
/
DSLOGIC_MAX_LOGIC_SAMPLERATE
))
devc
->
rle_mode
=
TRUE
;
else
devc
->
rle_mode
=
FALSE
;
}
}
ret
=
SR_OK
;
}
else
if
(
id
==
SR_CONF_DEVICE_MODE
)
{
sdi
->
mode
=
g_variant_get_int16
(
data
);
...
...
@@ -1594,7 +1586,6 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
}
else
if
(
!
strcmp
(
stropt
,
opmodes
[
SR_OP_STREAM
])
&&
(
devc
->
op_mode
!=
SR_OP_STREAM
))
{
devc
->
op_mode
=
SR_OP_STREAM
;
devc
->
stream
=
TRUE
;
devc
->
rle_mode
=
FALSE
;
devc
->
ch_mode
=
0
;
devc
->
samplerates_size
=
10
;
adjust_probes
(
sdi
,
stream_ch_num
[
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