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
Hide 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)
...
@@ -21169,7 +21169,7 @@ int GeDsTrend::scan(grow_tObject object)
return 1;
return 1;
for (i = 0; i < dstrend_cnt; i++) {
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))
if (EVEN(sts))
return sts;
return sts;
}
}
...
@@ -21915,6 +21915,7 @@ GeSevHist::GeSevHist(GeDyn* e_dyn)
...
@@ -21915,6 +21915,7 @@ GeSevHist::GeSevHist(GeDyn* e_dyn)
strcpy(minvalue_attr2, "");
strcpy(minvalue_attr2, "");
strcpy(maxvalue_attr2, "");
strcpy(maxvalue_attr2, "");
strcpy(hold_attr, "");
strcpy(hold_attr, "");
strcpy(update_attr, "");
strcpy(mark1_attr, "");
strcpy(mark1_attr, "");
strcpy(mark2_attr, "");
strcpy(mark2_attr, "");
}
}
...
@@ -22620,7 +22621,9 @@ int GeSevHist::scan(grow_tObject object)
...
@@ -22620,7 +22621,9 @@ int GeSevHist::scan(grow_tObject object)
unsigned int vsize;
unsigned int vsize;
pwr_tTime from, to;
pwr_tTime from, to;
pwr_tDeltaTime diff;
pwr_tDeltaTime diff;
double time;
double *tdata, *vdata;
double *tdata, *vdata;
int points;
time_GetTime(&to);
time_GetTime(&to);
time_Asub(&from, &to, &dt_timerange);
time_Asub(&from, &to, &dt_timerange);
...
@@ -22636,27 +22639,61 @@ int GeSevHist::scan(grow_tObject object)
...
@@ -22636,27 +22639,61 @@ int GeSevHist::scan(grow_tObject object)
if (EVEN(sts))
if (EVEN(sts))
continue;
continue;
tdata = (double*)calloc(1, 8 * rows);
switch (vtype) {
vdata = (double*)calloc(1, 8 * rows);
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++) {
for (k = 0; k < rows; k++) {
time_Adiff(&diff, &to, &tbuf[k]);
time_Adiff(&diff, &to, &tbuf[k]);
time_DToFloat64(&tdata[k], &diff);
time_DToFloat64(&time, &diff);
if (direction == glow_eHorizDirection_Right)
tdata[k] = timerange - tdata[k];
switch (vtype) {
switch (vtype) {
case pwr_eType_Int
64
:
case pwr_eType_Int
32
:
vdata[k] = ((pwr_tInt32*)vbuf)[k];
vdata[k] = ((pwr_tInt32*)vbuf)[k];
tdata[k] = time;
points++;
break;
break;
case pwr_eType_Float32:
case pwr_eType_Float32:
vdata[k] = ((pwr_tFloat32*)vbuf)[k];
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;
break;
default:
default:
return 0;
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(tdata);
free(vdata);
free(vdata);
free(tbuf);
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)
...
@@ -1168,7 +1168,7 @@ void GrowTrend::set_data(double* data[3], int data_curves, int data_points)
}
else
{
}
else
{
if
(
!
feq
(
y_max_value
[
j
],
y_min_value
[
j
]))
if
(
!
feq
(
y_max_value
[
j
],
y_min_value
[
j
]))
point_p
->
y
=
ur
.
y
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
);
/
(
y_max_value
[
j
]
-
y_min_value
[
j
])
*
(
ur
.
y
-
ll
.
y
);
point_p
->
y
=
MAX
(
ll
.
y
,
MIN
(
point_p
->
y
,
ur
.
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