Skip to content
Permalink
Browse files

Handle cases where the FireworkShowHandler is invalid

  • Loading branch information...
me4502 committed Aug 17, 2019
1 parent 6e121f0 commit 28d69c688d788c860256d4e2ba8c2accf05251e2
@@ -82,7 +82,9 @@ public void load() {

@Override
public void trigger(ChipState chip) {

if (handler == null) {
return;
}
if (chip.getInput(0) && !handler.isShowRunning())
handler.startShow();
else if (handler.isShowRunning() && stopOnLow)
@@ -91,6 +93,9 @@ else if (handler.isShowRunning() && stopOnLow)

@Override
public void think(ChipState chip) {
if (handler == null) {
return;
}
if(handler.isShowRunning() != chip.getOutput(0)) {
chip.setOutput(0, handler.isShowRunning());
}

0 comments on commit 28d69c6

Please sign in to comment.
You can’t perform that action at this time.