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
fb0ab007
Commit
fb0ab007
authored
Nov 11, 2019
by
Claes Sjofors
Committed by
Claes Sjöfors
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge dyn pwrameter type for float added, and set on FillLevel Min and MaxValue
parent
b4732120
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
xtt/lib/ge/src/ge_attrnav.cpp
xtt/lib/ge/src/ge_attrnav.cpp
+18
-0
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+2
-2
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+2
-1
No files found.
xtt/lib/ge/src/ge_attrnav.cpp
View file @
fb0ab007
...
...
@@ -1313,6 +1313,11 @@ int attrnav_attr_string_to_value(int type_id, char* value_str, void* buffer_ptr,
return
ATTRNAV__INPUT_SYNTAX
;
break
;
}
case
glow_eType_Float
:
{
if
(
sscanf
(
value_str
,
"%f"
,
(
pwr_tFloat32
*
)
buffer_ptr
)
!=
1
)
return
ATTRNAV__INPUT_SYNTAX
;
break
;
}
case
glow_eType_Double
:
{
pwr_tFloat32
f
;
pwr_tFloat64
d
;
...
...
@@ -1387,6 +1392,13 @@ void attrnav_attrvalue_to_string(
*
len
=
snprintf
(
str
,
size
,
format
,
*
(
pwr_tBoolean
*
)
value_ptr
);
break
;
}
case
glow_eType_Float
:
{
if
(
!
format
)
*
len
=
snprintf
(
str
,
size
,
"%g"
,
*
(
float
*
)
value_ptr
);
else
*
len
=
snprintf
(
str
,
size
,
format
,
*
(
float
*
)
value_ptr
);
break
;
}
case
glow_eType_Double
:
{
if
(
!
format
)
*
len
=
snprintf
(
str
,
size
,
"%g"
,
*
(
double
*
)
value_ptr
);
...
...
@@ -1588,6 +1600,12 @@ int AttrNav::set_attr_value(
message
(
0
,
'E'
,
"Min or maxvalue exceeded"
);
return
0
;
}
}
else
if
(
item
->
type_id
==
glow_eType_Float
)
{
if
(
*
(
float
*
)
&
buffer
<
item
->
min_limit
||
*
(
float
*
)
&
buffer
>
item
->
max_limit
)
{
message
(
0
,
'E'
,
"Min or maxvalue exceeded"
);
return
0
;
}
}
else
if
(
item
->
type_id
==
glow_eType_Int
)
{
if
(
*
(
int
*
)
&
buffer
<
item
->
min_limit
||
*
(
int
*
)
&
buffer
>
item
->
max_limit
)
{
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
fb0ab007
...
...
@@ -14873,12 +14873,12 @@ void GeFillLevel::get_attributes(attr_sItem* attrinfo, int* item_count)
strcpy(attrinfo[i].name, "FillLevel.MinValue");
attrinfo[i].value = &min_value;
attrinfo
[
i
].
type
=
glow_eType_
Double
;
attrinfo[i].type = glow_eType_
Float
;
attrinfo[i++].size = sizeof(min_value);
strcpy(attrinfo[i].name, "FillLevel.MaxValue");
attrinfo[i].value = &max_value;
attrinfo
[
i
].
type
=
glow_eType_
Double
;
attrinfo[i].type = glow_eType_
Float
;
attrinfo[i++].size = sizeof(max_value);
strcpy(attrinfo[i].name, "FillLevel.MinValueAttr");
...
...
xtt/lib/glow/src/glow.h
View file @
fb0ab007
...
...
@@ -98,7 +98,8 @@ typedef enum {
glow_eType_AnnotType
,
//!< Type is glow_eAnnotType
glow_eType_DynType2
,
//!< Type of dynamics mask 2
glow_eType_ActionType2
,
//!< Type of action mask 2
glow_eType_AppMotion
//!< Type is glow_eAppMotion
glow_eType_AppMotion
,
//!< Type is glow_eAppMotion
glow_eType_Float
//!< Type is a float
}
glow_eType
;
//! Type of Ctx class
...
...
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