Initial commit
This commit is contained in:
28
sources/com/ubt/jimu/blockly/exception/BlocklyEvent.java
Normal file
28
sources/com/ubt/jimu/blockly/exception/BlocklyEvent.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.ubt.jimu.blockly.exception;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BlocklyEvent<T> {
|
||||
public static final int BLOCKLY_DISCONNECT_BLE = 1006;
|
||||
public static final int CALL_JAVASCRIPT = 1004;
|
||||
public static final int COMMON_EXCEPTION = 1001;
|
||||
public static final int DISCONNECT_BLE = 1003;
|
||||
public static final int JS_EXCEPTION = 1002;
|
||||
|
||||
@Deprecated
|
||||
public static final int RESTART_BLOCKLY = 1005;
|
||||
private T msg;
|
||||
private int type;
|
||||
|
||||
public BlocklyEvent(int i, T t) {
|
||||
this.msg = t;
|
||||
this.type = i;
|
||||
}
|
||||
|
||||
public T getMessage() {
|
||||
return this.msg;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
package com.ubt.jimu.blockly.exception;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public enum JimuConnectionException {
|
||||
UNKNOW_EXCEPTION("unknow", 0, R.string.connect_ex_search),
|
||||
NOT_FOUND_DEVICE("searchJimu", 1, R.string.connect_ex_search),
|
||||
SERVO_ID_REPEAT("servoIdRepeat", 2, R.string.connect_ex_id_repeat),
|
||||
SERVO_ID_NOT_MATCH("servoVSLine", 3, R.string.connect_ex_servo_vs_line),
|
||||
SERVO_NUM_NOT_MATCH("servoNumVsLine", 4, R.string.connect_ex_servo_num_vs_line),
|
||||
SERVO_CONNECT_EXCEPTION("servoLineError", 5, R.string.connect_ex_servo_line),
|
||||
FIRMWARE_UPDATE_ERROR("firmwareUpdateError", 6, R.string.connect_ex_update_error),
|
||||
SYSTEM_HELP("systemHelp", 7, R.string.title_blockly_help),
|
||||
CONNECT_FAIL("connectFail", 8, R.string.title_blockly_help),
|
||||
UNICORN_AR_HELP("unicornARHelp", 9, R.string.title_blockly_help);
|
||||
|
||||
private String name;
|
||||
private int tipsResId;
|
||||
private int type;
|
||||
|
||||
JimuConnectionException(String str, int i, int i2) {
|
||||
this.name = str;
|
||||
this.type = i;
|
||||
this.tipsResId = i2;
|
||||
}
|
||||
|
||||
public static String getUrl(String str) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
int parseInt = Integer.parseInt(str);
|
||||
for (JimuConnectionException jimuConnectionException : values()) {
|
||||
if (jimuConnectionException.getType() == parseInt) {
|
||||
return "https://video.ubtrobot.com/jimu/product/h5/u3dLinkTips/index.html?pageType=" + jimuConnectionException.getName() + "&language=" + JimuApplication.l().g();
|
||||
}
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public int getTipsResId() {
|
||||
return this.tipsResId;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
18
sources/com/ubt/jimu/blockly/exception/JimuRobotMessage.java
Normal file
18
sources/com/ubt/jimu/blockly/exception/JimuRobotMessage.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.ubt.jimu.blockly.exception;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class JimuRobotMessage {
|
||||
public static final int ERROR = 2;
|
||||
public static final int SUCCESS = 1;
|
||||
public static final int WAITING = 0;
|
||||
private int level;
|
||||
private String msg;
|
||||
|
||||
public int getLevel() {
|
||||
return this.level;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return this.msg;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user