Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip A Levis
EE185
Commits
5a746970
Commit
5a746970
authored
Jun 16, 2020
by
Philip Levis
Browse files
Change highlight behavior of Layout Tool closer to what Charlie
would like (hopefully)!
parent
604c29dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
software/ui/src/engine/FlyerHighlighter.java
View file @
5a746970
...
...
@@ -5,7 +5,7 @@ import heronarts.lx.effect.LXEffect;
import
heronarts.lx.parameter.BooleanParameter
;
import
heronarts.lx.parameter.DiscreteParameter
;
import
heronarts.lx.parameter.LXParameter
;
import
heronarts.lx.modulator.
QuadraticEnvelope
;
import
heronarts.lx.modulator.
SquareLFO
;
import
java.util.List
;
...
...
@@ -17,7 +17,7 @@ import model.LightSamplePointModel;
public
class
FlyerHighlighter
extends
LXEffect
{
public
final
FlyerConfig
[]
flyerConfigurations
;
public
final
QuadraticEnvelope
strobe
=
new
QuadraticEnvelope
(
10
0
,
0
,
10
00
);
public
final
SquareLFO
strobe
=
new
SquareLFO
(
5
0
,
10
0
,
5
00
);
public
final
DiscreteParameter
flyerIndex
;
public
final
BooleanParameter
showBlanks
=
new
BooleanParameter
(
"BLANKS"
,
false
);
public
final
FlightModel
model
;
...
...
@@ -46,8 +46,8 @@ public class FlyerHighlighter extends LXEffect {
public
void
onParameterChanged
(
LXParameter
p
)
{
if
(
p
==
flyerIndex
)
{
strobe
.
setStartValue
(
100
);
strobe
.
trigger
();
}
//
strobe.trigger();
}
}
public
FlyerConfig
getConfig
()
{
...
...
@@ -67,14 +67,14 @@ public class FlyerHighlighter extends LXEffect {
}
public
void
trigger
()
{
strobe
.
trigger
();
//
strobe.trigger();
}
@Override
public
void
run
(
double
deltaMs
,
double
enabledAmount
)
{
// REVIEW(mcslee): looks redunant with HighlightLayer below?
if
(
isEnabled
())
{
for
(
LightSamplePointModel
point
:
getFlyerLightPoints
())
{
for
(
LightSamplePointModel
point
:
getFlyerLightPoints
())
{
int
oldColor
=
getColor
(
point
);
float
val
=
strobe
.
getValuef
();
int
highlightColor
=
LX
.
hsb
(
0
,
0
,
val
);
...
...
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