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
12afe116
Commit
12afe116
authored
Nov 26, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trends, square drawing for boolean trends added
parent
36b32fb3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
10 deletions
+47
-10
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+46
-9
xtt/lib/glow/src/glow_growtrend.cpp
xtt/lib/glow/src/glow_growtrend.cpp
+1
-1
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
12afe116
...
...
@@ -21169,7 +21169,7 @@ int GeDsTrend::scan(grow_tObject object)
return 1;
for (i = 0; i < dstrend_cnt; i++) {
sts
=
gdh_GetObjectInfoAttrref
(
&
dstrend_aref
[
i
],
&
tp
[
i
],
sizeof
(
tp
));
sts = gdh_GetObjectInfoAttrref(&dstrend_aref[i], &tp[i], sizeof(tp
[0]
));
if (EVEN(sts))
return sts;
}
...
...
@@ -21915,6 +21915,7 @@ GeSevHist::GeSevHist(GeDyn* e_dyn)
strcpy(minvalue_attr2, "");
strcpy(maxvalue_attr2, "");
strcpy(hold_attr, "");
strcpy(update_attr, "");
strcpy(mark1_attr, "");
strcpy(mark2_attr, "");
}
...
...
@@ -22620,7 +22621,9 @@ int GeSevHist::scan(grow_tObject object)
unsigned int vsize;
pwr_tTime from, to;
pwr_tDeltaTime diff;
double time;
double *tdata, *vdata;
int points;
time_GetTime(&to);
time_Asub(&from, &to, &dt_timerange);
...
...
@@ -22636,27 +22639,61 @@ int GeSevHist::scan(grow_tObject object)
if (EVEN(sts))
continue;
switch (vtype) {
case pwr_eType_Int32:
case pwr_eType_Float32:
tdata = (double*)calloc(1, 8 * rows);
vdata = (double*)calloc(1, 8 * rows);
break;
case pwr_eType_Boolean:
tdata = (double*)calloc(1, 8 * rows * 2);
vdata = (double*)calloc(1, 8 * rows * 2);
break;
default:
return 0;
}
points = 0;
for (k = 0; k < rows; k++) {
time_Adiff(&diff, &to, &tbuf[k]);
time_DToFloat64
(
&
tdata
[
k
],
&
diff
);
if
(
direction
==
glow_eHorizDirection_Right
)
tdata
[
k
]
=
timerange
-
tdata
[
k
];
time_DToFloat64(&time, &diff);
switch (vtype) {
case
pwr_eType_Int
64
:
case pwr_eType_Int
32
:
vdata[k] = ((pwr_tInt32*)vbuf)[k];
tdata[k] = time;
points++;
break;
case pwr_eType_Float32:
vdata[k] = ((pwr_tFloat32*)vbuf)[k];
tdata[k] = time;
points++;
break;
case pwr_eType_Boolean:
if (k == 0) {
vdata[points] = ((pwr_tBoolean*)vbuf)[k];
tdata[points++] = time;
}
else if (((pwr_tBoolean*)vbuf)[k] != ((pwr_tBoolean*)vbuf)[k-1]) {
vdata[points] = ((pwr_tBoolean*)vbuf)[k-1];
tdata[points++] = time;
vdata[points] = ((pwr_tBoolean*)vbuf)[k];
tdata[points++] = time;
}
else if (k == rows - 1) {
vdata[points] = ((pwr_tBoolean*)vbuf)[k];
tdata[points++] = time;
}
break;
default:
return 0;
}
}
grow_SetXYCurveData
(
object
,
vdata
,
tdata
,
i
,
rows
);
if (direction == glow_eHorizDirection_Right) {
for (k = 0; k < points; k++)
tdata[k] = timerange - tdata[k];
}
grow_SetXYCurveData(object, vdata, tdata, i, points);
free(tdata);
free(vdata);
free(tbuf);
...
...
xtt/lib/glow/src/glow_growtrend.cpp
View file @
12afe116
...
...
@@ -1168,7 +1168,7 @@ void GrowTrend::set_data(double* data[3], int data_curves, int data_points)
}
else
{
if
(
!
feq
(
y_max_value
[
j
],
y_min_value
[
j
]))
point_p
->
y
=
ur
.
y
-
(
data
[
j
+
1
][
idx
]
-
y_min_value
[
j
])
-
(
data
[
j
][
idx
]
-
y_min_value
[
j
])
/
(
y_max_value
[
j
]
-
y_min_value
[
j
])
*
(
ur
.
y
-
ll
.
y
);
point_p
->
y
=
MAX
(
ll
.
y
,
MIN
(
point_p
->
y
,
ur
.
y
));
...
...
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