Skip to content

Commit

Permalink
min updates to inmoov for new neopixel
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Nov 23, 2023
1 parent 9ad0145 commit 01cedf0
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/main/java/org/myrobotlab/service/InMoov2.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ public static boolean loadFile(String file) {

protected Long lastPirActivityTime;

protected LedDisplayData led = new LedDisplayData();

/**
* supported locales
*/
Expand Down Expand Up @@ -932,14 +930,8 @@ public void onPeak(double volume) {
* onPirOn flash neopixel
*/
public void onPirOn() {
led.action = "flash";
led.red = 50;
led.green = 100;
led.blue = 150;
led.count = 5;
led.interval = 500;
// FIXME flash on config.flashOnBoot
invoke("publishFlash");
invoke("publishFlash", "pir");
ProgramAB chatBot = (ProgramAB)getPeer("chatBot");
if (chatBot != null) {
String botState = chatBot.getPredicate("botState");
Expand Down Expand Up @@ -1233,18 +1225,12 @@ public String publishEvent(String event) {
*
* @return
*/
public LedDisplayData publishFlash() {
return led;
public String publishFlash(String flashName) {
return flashName;
}

public String publishHeartbeat() {
led.action = "flash";
led.red = 180;
led.green = 10;
led.blue = 30;
led.count = 1;
led.interval = 50;
invoke("publishFlash");
invoke("publishFlash", "heartbeat");
return getName();
}

Expand Down

0 comments on commit 01cedf0

Please sign in to comment.