Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
1456d2ed
Commit
1456d2ed
authored
Mar 02, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt trend add curve bugfix
parent
21c9aed8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
xtt/lib/glow/src/glow_growpolyline.cpp
xtt/lib/glow/src/glow_growpolyline.cpp
+10
-4
xtt/lib/xtt/src/xtt_trend.cpp
xtt/lib/xtt/src/xtt_trend.cpp
+9
-5
No files found.
xtt/lib/glow/src/glow_growpolyline.cpp
View file @
1456d2ed
...
...
@@ -1407,11 +1407,17 @@ void GrowPolyLine::add_and_shift_y_values( double *values, unsigned int no_of_va
if
(
!
no_of_values
)
return
;
for
(
unsigned
int
i
=
a_points
.
size
()
-
1
;
i
>=
no_of_values
;
i
--
)
((
GlowPoint
*
)
a_points
[
i
])
->
y
=
((
GlowPoint
*
)
a_points
[
i
-
no_of_values
])
->
y
;
if
(
no_of_values
>=
(
unsigned
int
)
a_points
.
size
())
{
for
(
unsigned
int
i
=
0
;
i
<
(
unsigned
int
)
a_points
.
size
();
i
++
)
((
GlowPoint
*
)
a_points
[
i
])
->
y
=
*
(
values
+
i
);
}
else
{
for
(
unsigned
int
i
=
a_points
.
size
()
-
1
;
i
>=
no_of_values
;
i
--
)
((
GlowPoint
*
)
a_points
[
i
])
->
y
=
((
GlowPoint
*
)
a_points
[
i
-
no_of_values
])
->
y
;
for
(
unsigned
int
i
=
0
;
i
<
no_of_values
;
i
++
)
((
GlowPoint
*
)
a_points
[
i
])
->
y
=
*
(
values
+
i
);
for
(
unsigned
int
i
=
0
;
i
<
no_of_values
;
i
++
)
((
GlowPoint
*
)
a_points
[
i
])
->
y
=
*
(
values
+
i
);
}
zoom
();
nav_zoom
();
}
...
...
xtt/lib/xtt/src/xtt_trend.cpp
View file @
1456d2ed
...
...
@@ -748,10 +748,14 @@ void XttTrend::trend_scan( void *data)
size
=
trend
->
cb_info
[
i
].
size
;
if
(
size
>
0
)
{
// Shift data
for
(
j
=
trend
->
cb_info
[
i
].
samples
-
1
;
j
>=
(
int
)
size
;
j
--
)
trend
->
gcd
->
y_data
[
i
][
j
]
=
trend
->
gcd
->
y_data
[
i
][
j
-
size
];
for
(
j
=
trend
->
cb_info
[
i
].
samples
-
1
;
j
>=
(
int
)
size
;
j
--
)
{
if
(
j
<
trend
->
gcd
->
rows
[
i
])
trend
->
gcd
->
y_data
[
i
][
j
]
=
trend
->
gcd
->
y_data
[
i
][
j
-
size
];
}
// Insert new value
switch
(
trend
->
element_type
[
i
])
{
case
pwr_eType_Float64
:
...
...
@@ -1237,7 +1241,7 @@ void XttTrend::curve_add( pwr_tAttrRef *arp, pwr_tAttrRef *trend_arp, pwr_tStatu
}
for
(
i
=
start_idx
;
i
<
trend_cnt
;
i
++
)
{
gcd
->
y_data
[
i
]
=
(
double
*
)
calloc
(
1
,
8
*
max_points
);
gcd
->
y_data
[
i
]
=
(
double
*
)
calloc
(
1
,
8
*
MAX
((
unsigned
int
)
max_points
,
actual_data_size
[
i
])
);
switch
(
element_type
[
i
])
{
case
pwr_eType_Float32
:
...
...
@@ -1289,7 +1293,7 @@ void XttTrend::curve_add( pwr_tAttrRef *arp, pwr_tAttrRef *trend_arp, pwr_tStatu
gcd
->
y_axis_type
[
i
]
=
curve_eAxis_y
;
strcpy
(
gcd
->
y_name
[
i
],
object_name
[
i
]);
gcd
->
rows
[
i
]
=
max_points
;
gcd
->
rows
[
i
]
=
actual_data_size
[
i
]
;
}
gcd
->
cols
=
trend_cnt
;
...
...
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