|
|
|
@ -55,6 +55,8 @@ public class ViewDeviceInfo extends ViewBase<ViewDeviceInfoBinding> { |
|
|
|
if ("开启".equals(syncTest)) binding.rgSyncTest.check(R.id.sync_test_open); |
|
|
|
else binding.rgSyncTest.check(R.id.sync_test_close); |
|
|
|
|
|
|
|
Constant.asrModel = DeviceData.getDeviceInfo(DeviceData.HINT_ASR_MODE, "aihome"); |
|
|
|
|
|
|
|
switch (Constant.asrModel){ |
|
|
|
case "aihome" : |
|
|
|
binding.rgModel.check(R.id.rg_model_home); |
|
|
|
@ -297,27 +299,29 @@ public class ViewDeviceInfo extends ViewBase<ViewDeviceInfoBinding> { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
String model = ""; |
|
|
|
switch (binding.rgModel.getCheckedRadioButtonId()){ |
|
|
|
case R.id.rg_model_home : |
|
|
|
Constant.asrModel = "aihome"; |
|
|
|
model = "aihome"; |
|
|
|
break; |
|
|
|
case R.id.rg_model_english : |
|
|
|
Constant.asrModel = "aienglish"; |
|
|
|
model = "aienglish"; |
|
|
|
break; |
|
|
|
case R.id.rg_model_rot : |
|
|
|
Constant.asrModel = "airobot"; |
|
|
|
model = "airobot"; |
|
|
|
break; |
|
|
|
case R.id.rg_model_all : |
|
|
|
Constant.asrModel = "aiuniversal"; |
|
|
|
model = "aiuniversal"; |
|
|
|
break; |
|
|
|
case R.id.rg_model_zhen : |
|
|
|
Constant.asrModel = "aienglish-mix"; |
|
|
|
model = "aienglish-mix"; |
|
|
|
break; |
|
|
|
} |
|
|
|
LoggerUtil.e("asrModel: ",Constant.asrModel); |
|
|
|
LoggerUtil.e("asrModel: ",model); |
|
|
|
|
|
|
|
FloorData.saveCurrentDeviceInfo(machine); |
|
|
|
|
|
|
|
Constant.asrModel = model; |
|
|
|
DeviceData.saveDeviceInfo(DeviceData.HINT_ASR_MODE, model);//设备ip
|
|
|
|
DeviceData.saveDeviceInfo(DeviceData.HINT_SYNC_TEST, checkId == R.id.sync_test_open ? "开启" : "关闭"); |
|
|
|
DeviceData.saveDeviceInfo(DeviceData.HINT_DEVICE_IP, deviceIp);//设备ip
|
|
|
|
DeviceData.saveDeviceInfo(DeviceData.HINT_DEVICE_CODE, StringUtil.getString(machine.getCode()));//设备code
|
|
|
|
@ -330,7 +334,6 @@ public class ViewDeviceInfo extends ViewBase<ViewDeviceInfoBinding> { |
|
|
|
DeviceData.addDevice((DeviceInfoActivity) context, null, () -> { |
|
|
|
if (listener != null) listener.onClick(ACTION_SAVE_DEVICE_INFO); |
|
|
|
}); |
|
|
|
MyApplication.getInstance().restartApp(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|