Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
NUI
TULIP-CPS
Commits
d226fa2b
Commit
d226fa2b
authored
Sep 14, 2020
by
Nico Mack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing stepSize bootstrapping property
parent
7441654b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
CPS/config/CpsNamespace.properties
CPS/config/CpsNamespace.properties
+1
-0
CPS/src/lu/list/itis/dkd/tui/utility/CpsNamespace.java
CPS/src/lu/list/itis/dkd/tui/utility/CpsNamespace.java
+1
-0
CPS/src/lu/list/itis/dkd/tui/utility/RotaryEncoder.java
CPS/src/lu/list/itis/dkd/tui/utility/RotaryEncoder.java
+8
-0
No files found.
CPS/config/CpsNamespace.properties
View file @
d226fa2b
ABOVE_ELEMENT
=
above
AREA_NODE
=
area
ANGULAR_STEP_SIZE_NODE
=
angularStepSize
BACKGROUND_NODE
=
background
BELOW_ELEMENT
=
below
...
...
CPS/src/lu/list/itis/dkd/tui/utility/CpsNamespace.java
View file @
d226fa2b
...
...
@@ -27,6 +27,7 @@ public class CpsNamespace extends NLS {
private
static
final
String
BUNDLE_NAME
=
"CpsNamespace"
;
//$NON-NLS-1$
public
static
String
ABOVE_ELEMENT
;
public
static
String
AREA_NODE
;
public
static
String
ANGULAR_STEP_SIZE_NODE
;
public
static
String
BACKGROUND_NODE
;
...
...
CPS/src/lu/list/itis/dkd/tui/utility/RotaryEncoder.java
View file @
d226fa2b
...
...
@@ -108,6 +108,7 @@ public class RotaryEncoder {
this
.
value
=
this
.
initialValue
;
this
.
lowerBound
=
BootstrappingUtils
.
getContentAsDouble
(
rootNode
,
Externalization
.
LOWER_BOUND_NODE
,
BootstrappingUtils
.
OPTIONAL
,
0
d
,
context
);
this
.
upperBound
=
BootstrappingUtils
.
getContentAsDouble
(
rootNode
,
Externalization
.
UPPER_BOUND_NODE
,
BootstrappingUtils
.
MANDATORY
,
null
,
context
);;
this
.
stepSize
=
BootstrappingUtils
.
getContentAsDouble
(
rootNode
,
CpsNamespace
.
STEP_SIZE_NODE
,
BootstrappingUtils
.
OPTIONAL
,
1
d
,
context
);
this
.
lowerStopAngle
=
BootstrappingUtils
.
getContentAsRadians
(
rootNode
,
CpsNamespace
.
LOWER_STOP_ANGLE_NODE
,
BootstrappingUtils
.
OPTIONAL
,
Double
.
NaN
,
context
);
this
.
upperStopAngle
=
BootstrappingUtils
.
getContentAsRadians
(
rootNode
,
CpsNamespace
.
UPPER_STOP_ANGLE_NODE
,
BootstrappingUtils
.
OPTIONAL
,
Double
.
NaN
,
context
);
this
.
multiTurn
=
BootstrappingUtils
.
getContentAsBoolean
(
rootNode
,
CpsNamespace
.
MULTITURN_NODE
,
BootstrappingUtils
.
OPTIONAL
,
Boolean
.
FALSE
,
context
);
...
...
@@ -133,6 +134,13 @@ public class RotaryEncoder {
// ***************************************************************************
// ---------------------------------------------------------------------------
public
void
setValue
(
double
newValue
)
{
this
.
value
=
Math
.
max
(
this
.
lowerBound
,
newValue
);
this
.
value
=
Math
.
min
(
this
.
upperBound
,
newValue
);
}
// ---------------------------------------------------------------------------
public
void
setStopAngles
(
double
lower
,
double
upper
)
{
this
.
lowerStopAngle
=
Math
.
min
(
lower
,
upper
);
this
.
upperStopAngle
=
Math
.
max
(
lower
,
upper
);
...
...
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