Ver código fonte

添加下位设备操作的类,以及中英文字符串文件。

味魔方Android
Nah 11 meses atrás
pai
commit
949b58ebba
7 arquivos alterados com 106 adições e 12 exclusões
  1. +6
    -0
      .idea/compiler.xml
  2. +20
    -0
      .idea/gradle.xml
  3. +4
    -0
      .idea/misc.xml
  4. +69
    -0
      .idea/shelf/Uncommitted_changes_before_Checkout_at_2023_12_4_14_14_[Changes]/shelved.patch
  5. +4
    -0
      .idea/shelf/Uncommitted_changes_before_Checkout_at_2023_12_4_14_14__Changes_.xml
  6. +2
    -11
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  7. +1
    -1
      app/src/main/java/com/bonait/bnframework/common/modbus/ModbusRTUServer.java

+ 6
- 0
.idea/compiler.xml Ver arquivo

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

+ 20
- 0
.idea/gradle.xml Ver arquivo

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="corretto-11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

+ 4
- 0
.idea/misc.xml Ver arquivo

@@ -0,0 +1,4 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK" />
</project>

+ 69
- 0
.idea/shelf/Uncommitted_changes_before_Checkout_at_2023_12_4_14_14_[Changes]/shelved.patch
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 4
- 0
.idea/shelf/Uncommitted_changes_before_Checkout_at_2023_12_4_14_14__Changes_.xml Ver arquivo

@@ -0,0 +1,4 @@
<changelist name="Uncommitted_changes_before_Checkout_at_2023_12_4_14_14_[Changes]" date="1701670451875" recycled="true" deleted="true">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_2023_12_4_14_14_[Changes]/shelved.patch" />
<option name="DESCRIPTION" value="Uncommitted changes before Checkout at 2023/12/4 14:14 [Changes]" />
</changelist>

+ 2
- 11
app/src/main/java/com/bonait/bnframework/business/MainInit.java Ver arquivo

@@ -9,30 +9,21 @@ import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.file.DBHelper;
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG;
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
import com.bonait.bnframework.common.db.mode.BPA_LOG;
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS;
import com.bonait.bnframework.common.db.mode.BPA_SILOS;
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL;
import com.bonait.bnframework.common.db.mode.BPA_USER;
import com.bonait.bnframework.common.db.res.AlertLogEnum;
import com.bonait.bnframework.common.db.res.ResGoodsRecipe;
import com.bonait.bnframework.common.db.res.UserLogEnum;
import com.bonait.bnframework.common.helper.CrashHandler;
import com.bonait.bnframework.common.helper.I.IMessageLogNotify;
import com.bonait.bnframework.common.helper.MessageLog;
import com.bonait.bnframework.common.helper.SdCart;
import com.bonait.bnframework.common.modbus.ModbusTcpHelper;
import com.bonait.bnframework.common.notification.MainNotification;
import com.bonait.bnframework.common.utils.AppUtils;
import com.bonait.bnframework.common.utils.NetworkUtils;
import com.bonait.bnframework.common.utils.PreferenceUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.utils.WifiInterceptor;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.cache.CacheEntity;
@@ -215,8 +206,8 @@ public class MainInit {
public void ErrorMsg(String msg) {
if(msg.contains("msg:com.serotonin.modbus4j.exception"))
{
ModbusTcpHelper.get().release();//释放modbus
ConfigName.getInstance().PlcIsConnect=false;
//ModbusTcpHelper.get().release();//释放modbus
//ConfigName.getInstance().PlcIsConnect=false;

BPA_ALERTLOG log = new BPA_ALERTLOG();
log.userID = ConfigName.getInstance().user.userID;


+ 1
- 1
app/src/main/java/com/bonait/bnframework/common/modbus/ModbusRTUServer.java Ver arquivo

@@ -84,7 +84,7 @@ public class ModbusRTUServer {
int stopBits=ConfigName.getInstance().SerialStopBits;
//String com="COM0";

param = SerialParam.create("/dev/ttyCOM1", baudRate) // 串口地址和波特率
param = SerialParam.create("/dev/ttyCOM0", baudRate) // 串口地址和波特率
.setDataBits(dataBits) // 数据位
.setParity(parity) // 校验位
.setStopBits(stopBits) // 停止位


Carregando…
Cancelar
Salvar