Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picsimlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
picsimlab
Commits
4ba8ae87
Commit
4ba8ae87
authored
Apr 14, 2024
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Fix Oscilloscope to use all SpareParts pins.
parent
8edf0a7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
31 deletions
+26
-31
src/lib/oscilloscope.cc
src/lib/oscilloscope.cc
+25
-30
src/lib/types.h
src/lib/types.h
+1
-1
No files found.
src/lib/oscilloscope.cc
View file @
4ba8ae87
...
@@ -625,20 +625,21 @@ void COscilloscope::SetBaseTimer(void) {
...
@@ -625,20 +625,21 @@ void COscilloscope::SetBaseTimer(void) {
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBODELETEITEMS
,
NULL
);
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBODELETEITEMS
,
NULL
);
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBODELETEITEMS
,
NULL
);
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBODELETEITEMS
,
NULL
);
for
(
int
i
=
1
;
i
<=
PinCount
;
i
++
)
{
std
::
string
spin
;
if
(
pboard
->
GetUseSpareParts
())
{
if
(
pboard
->
GetUseSpareParts
())
{
spin
=
SpareParts
.
GetPinName
(
i
);
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOSETITEMS
,
SpareParts
.
GetPinsNames
().
c_str
());
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBOSETITEMS
,
SpareParts
.
GetPinsNames
().
c_str
());
}
else
{
}
else
{
for
(
int
i
=
1
;
i
<=
PinCount
;
i
++
)
{
std
::
string
spin
;
spin
=
pboard
->
MGetPinName
(
i
);
spin
=
pboard
->
MGetPinName
(
i
);
}
if
(
spin
.
compare
(
"error"
))
{
if
(
spin
.
compare
(
"error"
))
{
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWM_COMBOADDITEM
,
(
std
::
to_string
(
i
)
+
" "
+
spin
).
c_str
());
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOADDITEM
,
(
std
::
to_string
(
i
)
+
" "
+
spin
).
c_str
());
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWM_COMBOADDITEM
,
(
std
::
to_string
(
i
)
+
" "
+
spin
).
c_str
());
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBOADDITEM
,
(
std
::
to_string
(
i
)
+
" "
+
spin
).
c_str
());
}
}
}
}
}
if
(
chp
[
0
]
<=
PinCount
)
{
std
::
string
spin
;
std
::
string
spin
;
if
(
pboard
->
GetUseSpareParts
())
{
if
(
pboard
->
GetUseSpareParts
())
{
spin
=
SpareParts
.
GetPinName
(
chp
[
0
]);
spin
=
SpareParts
.
GetPinName
(
chp
[
0
]);
...
@@ -646,19 +647,13 @@ void COscilloscope::SetBaseTimer(void) {
...
@@ -646,19 +647,13 @@ void COscilloscope::SetBaseTimer(void) {
spin
=
pboard
->
MGetPinName
(
chp
[
0
]);
spin
=
pboard
->
MGetPinName
(
chp
[
0
]);
}
}
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOSETTEXT
,
(
std
::
to_string
(
chp
[
0
])
+
" "
+
spin
).
c_str
());
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOSETTEXT
,
(
std
::
to_string
(
chp
[
0
])
+
" "
+
spin
).
c_str
());
}
else
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOSETTEXT
,
"1"
);
if
(
chp
[
1
]
<=
PinCount
)
{
std
::
string
spin
;
if
(
pboard
->
GetUseSpareParts
())
{
if
(
pboard
->
GetUseSpareParts
())
{
spin
=
SpareParts
.
GetPinName
(
chp
[
1
]);
spin
=
SpareParts
.
GetPinName
(
chp
[
1
]);
}
else
{
}
else
{
spin
=
pboard
->
MGetPinName
(
chp
[
1
]);
spin
=
pboard
->
MGetPinName
(
chp
[
1
]);
}
}
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBOSETTEXT
,
(
std
::
to_string
(
chp
[
1
])
+
" "
+
spin
).
c_str
());
WindowCmd
(
PW_MAIN
,
"combo3"
,
PWA_COMBOSETTEXT
,
(
std
::
to_string
(
chp
[
1
])
+
" "
+
spin
).
c_str
());
}
else
WindowCmd
(
PW_MAIN
,
"combo2"
,
PWA_COMBOSETTEXT
,
"2"
);
WindowCmd
(
PW_MAIN
,
"spind5"
,
PWA_SPINDGETVALUE
,
NULL
,
&
tscale
);
WindowCmd
(
PW_MAIN
,
"spind5"
,
PWA_SPINDGETVALUE
,
NULL
,
&
tscale
);
...
...
src/lib/types.h
View file @
4ba8ae87
...
@@ -42,7 +42,7 @@ enum PICSimLabWindowAction {
...
@@ -42,7 +42,7 @@ enum PICSimLabWindowAction {
PWA_COMBOPROPEV
,
PWA_COMBOPROPEV
,
PWA_COMBOPARTEV
,
PWA_COMBOPARTEV
,
PWA_COMBODELETEITEMS
,
PWA_COMBODELETEITEMS
,
PW
M
_COMBOADDITEM
,
PW
A
_COMBOADDITEM
,
PWA_SPINDSETMAX
,
PWA_SPINDSETMAX
,
PWA_SPINDSETMIN
,
PWA_SPINDSETMIN
,
...
...
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