jimu-decompiled/sources/com/ubt/jimu/blockly/exception/JimuConnectionException.java
2025-05-13 19:24:51 +02:00

59 lines
2.0 KiB
Java

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;
}
}