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
c2adf2e3
Commit
c2adf2e3
authored
Apr 14, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge value dynamic bugfix for annotation numbers higher than 1
parent
d7d99b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
java/jpwr/jopg/src/Dyn.java
java/jpwr/jopg/src/Dyn.java
+19
-7
No files found.
java/jpwr/jopg/src/Dyn.java
View file @
c2adf2e3
...
...
@@ -647,7 +647,7 @@ public class Dyn {
public
static
final
int
ePwrStatus_Error
=
3
;
public
static
final
int
ePwrStatus_Fatal
=
4
;
public
static
final
boolean
debug
=
tru
e
;
public
static
final
boolean
debug
=
fals
e
;
Vector
<
DynElem
>
elements
=
new
Vector
<
DynElem
>();
GraphIfc
graph
;
...
...
@@ -1520,6 +1520,16 @@ public class Dyn {
action_type1
|=
mActionType1_Confirm
;
}
public
int
instance_to_number
(
int
instance
)
{
int
inst
=
1
;
int
m
=
instance
;
while
(
m
>
1
)
{
m
=
m
>>
1
;
inst
++;
}
return
inst
;
}
public
class
DynElem
{
Dyn
dyn
;
int
dyn_type1
;
...
...
@@ -2972,6 +2982,8 @@ public class Dyn {
if
(
!
attrFound
)
return
;
int
annot_num
=
dyn
.
instance_to_number
(
instance
);
switch
(
a_typeid
)
{
case
Pwr
.
eType_Float32
:
{
float
value0
=
0
;
...
...
@@ -2986,7 +2998,7 @@ public class Dyn {
if
(
value0
!=
oldValueF
||
firstScan
)
{
if
(
cFormat
!=
null
)
{
sb
=
cFormat
.
format
(
value0
,
sb
);
object
.
setAnnotation
(
1
,
new
String
(
sb
));
object
.
setAnnotation
(
annot_num
,
new
String
(
sb
));
}
dyn
.
repaintNow
=
true
;
oldValueF
=
value0
;
...
...
@@ -3011,7 +3023,7 @@ public class Dyn {
if
(
value0
!=
oldValueI
||
firstScan
)
{
sb
=
cFormat
.
format
(
value0
,
sb
);
object
.
setAnnotation
(
1
,
new
String
(
sb
));
object
.
setAnnotation
(
annot_num
,
new
String
(
sb
));
dyn
.
repaintNow
=
true
;
oldValueI
=
value0
;
}
...
...
@@ -3030,7 +3042,7 @@ public class Dyn {
if
(
value0
!=
oldValueB
||
firstScan
)
{
sb
=
cFormat
.
format
(
value0
,
sb
);
object
.
setAnnotation
(
1
,
new
String
(
sb
));
object
.
setAnnotation
(
annot_num
,
new
String
(
sb
));
dyn
.
repaintNow
=
true
;
oldValueB
=
value0
;
}
...
...
@@ -3052,7 +3064,7 @@ public class Dyn {
if
(
firstScan
||
!
value0
.
equals
(
oldValueS
))
{
sb
=
cFormat
.
format
(
value0
,
sb
);
object
.
setAnnotation
(
1
,
new
String
(
sb
));
object
.
setAnnotation
(
annot_num
,
new
String
(
sb
));
dyn
.
repaintNow
=
true
;
oldValueS
=
value0
;
}
...
...
@@ -3073,13 +3085,13 @@ public class Dyn {
switch
(
cFormat
.
type
())
{
case
GlowCFormat
.
FRM_M
:
{
CdhrString
cstr
=
dyn
.
graph
.
getGdh
().
getMsg
(
value0
);
object
.
setAnnotation
(
1
,
cstr
.
str
);
object
.
setAnnotation
(
annot_num
,
cstr
.
str
);
dyn
.
repaintNow
=
true
;
break
;
}
case
GlowCFormat
.
FRM_1M
:
{
CdhrString
cstr
=
dyn
.
graph
.
getGdh
().
getMsgText
(
value0
);
object
.
setAnnotation
(
1
,
cstr
.
str
);
object
.
setAnnotation
(
annot_num
,
cstr
.
str
);
dyn
.
repaintNow
=
true
;
break
;
}
...
...
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