begin working on PiIR integration
This commit is contained in:
parent
93be124e93
commit
1eab59c7d2
4 changed files with 51 additions and 8 deletions
16
src/main/java/com/mykola2312/mptv/config/PiIRBindItem.java
Normal file
16
src/main/java/com/mykola2312/mptv/config/PiIRBindItem.java
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.mykola2312.mptv.config;
|
||||||
|
|
||||||
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
|
import com.mykola2312.mptv.ui.MenuAction;
|
||||||
|
|
||||||
|
public class PiIRBindItem {
|
||||||
|
@NonNull
|
||||||
|
public String preData;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public String code;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public MenuAction menuAction;
|
||||||
|
}
|
||||||
15
src/main/java/com/mykola2312/mptv/config/PiIRConfig.java
Normal file
15
src/main/java/com/mykola2312/mptv/config/PiIRConfig.java
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.mykola2312.mptv.config;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
|
public class PiIRConfig {
|
||||||
|
@NonNull
|
||||||
|
public String exec;
|
||||||
|
|
||||||
|
public int gpio;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public List<PiIRBindItem> binds;
|
||||||
|
}
|
||||||
20
src/main/java/com/mykola2312/mptv/ui/MenuAction.java
Normal file
20
src/main/java/com/mykola2312/mptv/ui/MenuAction.java
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.mykola2312.mptv.ui;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public enum MenuAction {
|
||||||
|
@JsonProperty("up")
|
||||||
|
ACTION_UP,
|
||||||
|
|
||||||
|
@JsonProperty("down")
|
||||||
|
ACTION_DOWN,
|
||||||
|
|
||||||
|
@JsonProperty("left")
|
||||||
|
ACTION_LEFT,
|
||||||
|
|
||||||
|
@JsonProperty("right")
|
||||||
|
ACTION_RIGHT,
|
||||||
|
|
||||||
|
@JsonProperty("open")
|
||||||
|
ACTION_OPEN
|
||||||
|
}
|
||||||
|
|
@ -40,14 +40,6 @@ public class MenuPanel extends JPanel {
|
||||||
private int categoryIndex;
|
private int categoryIndex;
|
||||||
private int channelIndex;
|
private int channelIndex;
|
||||||
|
|
||||||
enum MenuAction {
|
|
||||||
ACTION_UP,
|
|
||||||
ACTION_DOWN,
|
|
||||||
ACTION_LEFT,
|
|
||||||
ACTION_RIGHT,
|
|
||||||
ACTION_OPEN
|
|
||||||
}
|
|
||||||
|
|
||||||
private MPV player = null;
|
private MPV player = null;
|
||||||
|
|
||||||
static class KeyboardMenuAction extends AbstractAction {
|
static class KeyboardMenuAction extends AbstractAction {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue