Skip to content

Commit 3d585c4

Browse files
author
Simon Pinfold
committed
Improved list of possible commands to match example code better
1 parent a724112 commit 3d585c4

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

app/src/main/java/com/imgtec/hobbyist/flow/Command.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@ public enum Command {
2626
SETLED2("SET LED #2", "SET LED #2"),
2727
SETLED3("SET LED #3", "SET LED #3"),
2828
SETLED4("SET LED #4", "SET LED #4"),
29-
CLEAR_LEDS("ACKNOWLEDGE LEDS", "CLEAR LEDS"),
30-
REBOOT_SOFTAP("REBOOT SOFTAP", "REBOOT SOFTAP"),
29+
SAY_HELLO("SAY HELLO", "SAY HELLO"),
30+
GET_STATUS("GET STATUS", "GET STATUS"),
3131
REBOOT("REBOOT", "REBOOT"),
32-
ARDUINO_COMMAND("ARDUINO COMMAND", "ARDUINO COMMAND"),
3332
FACTORY_RESET("FACTORY RESET", ""),
3433
RENAME_DEVICE("RENAME DEVICE", "");
3534

3635
public static String prepareCommand(String display) {
37-
if(display.contains(CLEAR_LEDS.displayedAs)) {
38-
return display.replace(CLEAR_LEDS.displayedAs, CLEAR_LEDS.command);
39-
}
4036
return display;
4137
}
4238

app/src/main/java/com/imgtec/hobbyist/fragments/menu/InteractiveModeFragment.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -406,23 +406,6 @@ public void onAsyncMessageResponse(MessagingEvent.AsyncMessageResponse response)
406406
@Override
407407
public void onCommandRXMessageReceived(final AsyncMessage msg) {
408408
showCommandRXMessage(msg);
409-
handler.post(new Runnable() {
410-
@Override
411-
public void run() {
412-
if (isCommandMode) {
413-
String commandText = commandEditText.getText().toString();
414-
if (commandText.equalsIgnoreCase(Command.REBOOT.getCommand()) || commandText.equalsIgnoreCase(Command.GET_STATUS.getCommand())) {
415-
reactOnRebootCommand();
416-
}
417-
}
418-
}
419-
420-
private void reactOnRebootCommand() {
421-
Fragment fragment = SimpleFragmentFactory.createFragment(ConnectedDevicesFragment.TAG, true);
422-
showConnectedDevicesFragmentDialog(fragment);
423-
((FlowActivity) activity).setUIMode(NDMenuMode.Initial);
424-
}
425-
});
426409
}
427410

428411
/**

0 commit comments

Comments
 (0)