Initial commit
This commit is contained in:
7
sources/com/ubt/jimu/base/data/CtrlMotionType.java
Normal file
7
sources/com/ubt/jimu/base/data/CtrlMotionType.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.ubt.jimu.base.data;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public enum CtrlMotionType {
|
||||
servo,
|
||||
motor
|
||||
}
|
40
sources/com/ubt/jimu/base/data/Engine.java
Normal file
40
sources/com/ubt/jimu/base/data/Engine.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.ubt.jimu.base.data;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class Engine implements Comparable {
|
||||
public static final int DIRECTION_CLOCK = 1;
|
||||
public static final int DIRECTION_DISCLOCK = -1;
|
||||
private int id;
|
||||
private int direction = 1;
|
||||
private boolean isConfigged = false;
|
||||
|
||||
public Engine(int i) {
|
||||
this.id = i;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
return this.direction;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public abstract CtrlMotionType getMotionType();
|
||||
|
||||
public boolean isConfigged() {
|
||||
return this.isConfigged;
|
||||
}
|
||||
|
||||
public void setConfigged(boolean z) {
|
||||
this.isConfigged = z;
|
||||
}
|
||||
|
||||
public void setDirection(int i) {
|
||||
this.direction = i;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Engine{id=" + this.id + " type=" + getMotionType() + '}';
|
||||
}
|
||||
}
|
31
sources/com/ubt/jimu/base/data/Motor.java
Normal file
31
sources/com/ubt/jimu/base/data/Motor.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.ubt.jimu.base.data;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class Motor extends Engine {
|
||||
public Motor(int i) {
|
||||
super(i);
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(Object obj) {
|
||||
if (obj != null && (obj instanceof Motor)) {
|
||||
return getId() - ((Motor) obj).getId();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.data.Engine
|
||||
public CtrlMotionType getMotionType() {
|
||||
return CtrlMotionType.motor;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.data.Engine
|
||||
public String toString() {
|
||||
return "Motor{direction=" + getDirection() + "} " + super.toString();
|
||||
}
|
||||
|
||||
public Motor(int i, int i2) {
|
||||
this(i);
|
||||
super.setDirection(i2);
|
||||
}
|
||||
}
|
46
sources/com/ubt/jimu/base/data/Servo.java
Normal file
46
sources/com/ubt/jimu/base/data/Servo.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package com.ubt.jimu.base.data;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class Servo extends Engine {
|
||||
public boolean isChoose;
|
||||
private ServoMode type;
|
||||
|
||||
public Servo(int i, ServoMode servoMode) {
|
||||
super(i);
|
||||
this.type = servoMode;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(Object obj) {
|
||||
if (obj != null && (obj instanceof Servo)) {
|
||||
return getId() - ((Servo) obj).getId();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public ServoMode getModeType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.data.Engine
|
||||
public CtrlMotionType getMotionType() {
|
||||
return CtrlMotionType.servo;
|
||||
}
|
||||
|
||||
public boolean isChoose() {
|
||||
return this.isChoose;
|
||||
}
|
||||
|
||||
public void setChoose(boolean z) {
|
||||
this.isChoose = z;
|
||||
}
|
||||
|
||||
public void setModeType(ServoMode servoMode) {
|
||||
this.type = servoMode;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.data.Engine
|
||||
public String toString() {
|
||||
return "Servo{type=" + this.type + "} " + super.toString();
|
||||
}
|
||||
}
|
7
sources/com/ubt/jimu/base/data/ServoMode.java
Normal file
7
sources/com/ubt/jimu/base/data/ServoMode.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.ubt.jimu.base.data;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public enum ServoMode {
|
||||
SERVO_MODE_ANGLE,
|
||||
SERVO_MODE_TURN
|
||||
}
|
Reference in New Issue
Block a user