Skip to content

Commit

Permalink
fixed npe in onPirOn
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Nov 5, 2023
1 parent 7b77292 commit 689ae2a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/myrobotlab/service/InMoov2.java
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,13 @@ public void onPirOn() {
led.interval = 500;
// FIXME flash on config.flashOnBoot
invoke("publishFlash");
String botState = chatBot.getPredicate("botState");
if ("sleeping".equals(botState)) {
invoke("publishEvent", "WAKE");
}
ProgramAB chatBot = (ProgramAB)getPeer("chatBot");
if (chatBot != null) {
String botState = chatBot.getPredicate("botState");
if ("sleeping".equals(botState)) {
invoke("publishEvent", "WAKE");
}
}
}

// GOOD GOOD GOOD - LOOPBACK - flexible and replacable by python
Expand Down

0 comments on commit 689ae2a

Please sign in to comment.