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
2d8ffd26
Commit
2d8ffd26
authored
Mar 22, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More limittypes in AnalogColor
parent
100b1e11
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
40 deletions
+148
-40
java/jpwr/jop/src/GeDyn.java
java/jpwr/jop/src/GeDyn.java
+3
-0
java/jpwr/jop/src/GeDynAnalogColor.java
java/jpwr/jop/src/GeDynAnalogColor.java
+71
-20
src/jpwr/jop/src/GeDyn.java
src/jpwr/jop/src/GeDyn.java
+3
-0
src/jpwr/jop/src/GeDynAnalogColor.java
src/jpwr/jop/src/GeDynAnalogColor.java
+71
-20
No files found.
java/jpwr/jop/src/GeDyn.java
View file @
2d8ffd26
...
...
@@ -55,6 +55,9 @@ public class GeDyn {
public
static
final
int
eLimitType_Gt
=
0
;
public
static
final
int
eLimitType_Lt
=
1
;
public
static
final
int
eLimitType_Ge
=
2
;
public
static
final
int
eLimitType_Le
=
3
;
public
static
final
int
eLimitType_Eq
=
4
;
public
static
final
int
eEvent_MB1Up
=
0
;
public
static
final
int
eEvent_MB1Down
=
1
;
...
...
java/jpwr/jop/src/GeDynAnalogColor.java
View file @
2d8ffd26
...
...
@@ -10,7 +10,9 @@ public class GeDynAnalogColor extends GeDynElem {
boolean
attrFound
;
PwrtRefId
subid
;
int
p
;
float
oldValue
;
public
int
typeId
;
float
oldValueF
;
int
oldValueI
;
boolean
firstScan
=
true
;
boolean
oldState
;
boolean
isMainInstance
=
false
;
...
...
@@ -44,11 +46,13 @@ public class GeDynAnalogColor extends GeDynElem {
mainInstance
.
attrFound
=
true
;
mainInstance
.
p
=
ret
.
id
;
mainInstance
.
subid
=
ret
.
refid
;
mainInstance
.
typeId
=
ret
.
typeId
;
mainInstance
.
isMainInstance
=
true
;
}
}
p
=
mainInstance
.
p
;
attrFound
=
mainInstance
.
attrFound
;
typeId
=
mainInstance
.
typeId
;
}
}
public
void
disconnect
()
{
...
...
@@ -59,10 +63,15 @@ public class GeDynAnalogColor extends GeDynElem {
if
(
!
attrFound
||
dyn
.
ignoreColor
)
return
;
boolean
state
=
false
;
boolean
set_color
=
false
;
boolean
reset_color
=
false
;
if
(
typeId
==
Pwr
.
eType_Float32
)
{
float
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
p
);
int
i
;
if
(
!
firstScan
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValue
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValueF
)
{
if
(
oldState
)
dyn
.
ignoreColor
=
true
;
return
;
...
...
@@ -71,14 +80,57 @@ public class GeDynAnalogColor extends GeDynElem {
else
firstScan
=
false
;
boolean
state
;
boolean
set_color
=
false
;
boolean
reset_color
=
false
;
if
(
limitType
==
GeDyn
.
eLimitType_Gt
)
switch
(
limitType
)
{
case
GeDyn
.
eLimitType_Gt
:
state
=
value
>
limit
;
break
;
case
GeDyn
.
eLimitType_Lt
:
state
=
value
<
limit
;
break
;
case
GeDyn
.
eLimitType_Ge
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Le
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Eq
:
state
=
value
==
limit
;
break
;
}
oldValueF
=
value
;
}
else
if
(
typeId
==
Pwr
.
eType_Int32
)
{
int
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoInt
(
p
);
int
i
;
if
(
!
firstScan
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValueI
)
{
if
(
oldState
)
dyn
.
ignoreColor
=
true
;
return
;
}
}
else
firstScan
=
false
;
switch
(
limitType
)
{
case
GeDyn
.
eLimitType_Gt
:
state
=
value
>
limit
;
break
;
case
GeDyn
.
eLimitType_Lt
:
state
=
value
<
limit
;
break
;
case
GeDyn
.
eLimitType_Ge
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Le
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Eq
:
state
=
value
==
limit
;
break
;
}
oldValueI
=
value
;
}
if
(
state
!=
oldState
||
dyn
.
resetColor
||
firstScan
)
{
if
(
state
)
{
...
...
@@ -91,11 +143,10 @@ public class GeDynAnalogColor extends GeDynElem {
}
oldState
=
state
;
}
else
if
(
state
)
dyn
.
ignoreColor
=
true
;
oldValue
=
value
;
if
(
!
set_color
&&
!
reset_color
)
return
;
...
...
src/jpwr/jop/src/GeDyn.java
View file @
2d8ffd26
...
...
@@ -55,6 +55,9 @@ public class GeDyn {
public
static
final
int
eLimitType_Gt
=
0
;
public
static
final
int
eLimitType_Lt
=
1
;
public
static
final
int
eLimitType_Ge
=
2
;
public
static
final
int
eLimitType_Le
=
3
;
public
static
final
int
eLimitType_Eq
=
4
;
public
static
final
int
eEvent_MB1Up
=
0
;
public
static
final
int
eEvent_MB1Down
=
1
;
...
...
src/jpwr/jop/src/GeDynAnalogColor.java
View file @
2d8ffd26
...
...
@@ -10,7 +10,9 @@ public class GeDynAnalogColor extends GeDynElem {
boolean
attrFound
;
PwrtRefId
subid
;
int
p
;
float
oldValue
;
public
int
typeId
;
float
oldValueF
;
int
oldValueI
;
boolean
firstScan
=
true
;
boolean
oldState
;
boolean
isMainInstance
=
false
;
...
...
@@ -44,11 +46,13 @@ public class GeDynAnalogColor extends GeDynElem {
mainInstance
.
attrFound
=
true
;
mainInstance
.
p
=
ret
.
id
;
mainInstance
.
subid
=
ret
.
refid
;
mainInstance
.
typeId
=
ret
.
typeId
;
mainInstance
.
isMainInstance
=
true
;
}
}
p
=
mainInstance
.
p
;
attrFound
=
mainInstance
.
attrFound
;
typeId
=
mainInstance
.
typeId
;
}
}
public
void
disconnect
()
{
...
...
@@ -59,10 +63,15 @@ public class GeDynAnalogColor extends GeDynElem {
if
(
!
attrFound
||
dyn
.
ignoreColor
)
return
;
boolean
state
=
false
;
boolean
set_color
=
false
;
boolean
reset_color
=
false
;
if
(
typeId
==
Pwr
.
eType_Float32
)
{
float
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
p
);
int
i
;
if
(
!
firstScan
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValue
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValueF
)
{
if
(
oldState
)
dyn
.
ignoreColor
=
true
;
return
;
...
...
@@ -71,14 +80,57 @@ public class GeDynAnalogColor extends GeDynElem {
else
firstScan
=
false
;
boolean
state
;
boolean
set_color
=
false
;
boolean
reset_color
=
false
;
if
(
limitType
==
GeDyn
.
eLimitType_Gt
)
switch
(
limitType
)
{
case
GeDyn
.
eLimitType_Gt
:
state
=
value
>
limit
;
break
;
case
GeDyn
.
eLimitType_Lt
:
state
=
value
<
limit
;
break
;
case
GeDyn
.
eLimitType_Ge
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Le
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Eq
:
state
=
value
==
limit
;
break
;
}
oldValueF
=
value
;
}
else
if
(
typeId
==
Pwr
.
eType_Int32
)
{
int
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoInt
(
p
);
int
i
;
if
(
!
firstScan
)
{
if
(
!
dyn
.
resetColor
&&
value
==
oldValueI
)
{
if
(
oldState
)
dyn
.
ignoreColor
=
true
;
return
;
}
}
else
firstScan
=
false
;
switch
(
limitType
)
{
case
GeDyn
.
eLimitType_Gt
:
state
=
value
>
limit
;
break
;
case
GeDyn
.
eLimitType_Lt
:
state
=
value
<
limit
;
break
;
case
GeDyn
.
eLimitType_Ge
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Le
:
state
=
value
>=
limit
;
break
;
case
GeDyn
.
eLimitType_Eq
:
state
=
value
==
limit
;
break
;
}
oldValueI
=
value
;
}
if
(
state
!=
oldState
||
dyn
.
resetColor
||
firstScan
)
{
if
(
state
)
{
...
...
@@ -91,11 +143,10 @@ public class GeDynAnalogColor extends GeDynElem {
}
oldState
=
state
;
}
else
if
(
state
)
dyn
.
ignoreColor
=
true
;
oldValue
=
value
;
if
(
!
set_color
&&
!
reset_color
)
return
;
...
...
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