ttyS4改为ttyS7,删除manifest中sharedUserId配置

This commit is contained in:
2026-03-16 11:07:15 +08:00
parent 795deae228
commit c8eb2b8f24
2 changed files with 6 additions and 5 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:sharedUserId="android.uid.system">
xmlns:tools="http://schemas.android.com/tools">
<!-- android:sharedUserId="android.uid.system"-->
<uses-feature android:name="android.hardware.usb.host" />
<uses-permission android:name="android.permission.INTERNET" />
@@ -24,7 +24,8 @@ public class Weigher2 {
public static final int ERR_004 = 1004;
public static final int ERR_PCB_NOT_SUPPORT = 2000;
private static SensorScale mSensorScale;
private static String mDevicePort = "/dev/ttyS4";
// private static String mDevicePort = "/dev/ttyS4";
private static String mDevicePort = "/dev/ttyS7";
private static boolean mConnect = false;
private static Listener mListener;
@@ -41,7 +42,8 @@ public class Weigher2 {
System.init();
initScale();
if (var0 == "pcb_908") {
mDevicePort = "/dev/ttyS4";
// mDevicePort = "/dev/ttyS4";
mDevicePort = "/dev/ttyS7";
}
mSensorScale.openScale(mDevicePort, 115200, (open) -> {