Skip to content

Commit

Permalink
剩余代码提交
Browse files Browse the repository at this point in the history
  • Loading branch information
陈力 committed Oct 16, 2023
1 parent 3314ceb commit cd4bb33
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/src/main/java/com/cl/myapplication/MainJavaActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class MainJavaActivity extends AppCompatActivity implements AdapterView.O
private ActivityMainJavaBinding binding;
private Device mDevice;
private byte[] b1 = {(byte) 33, (byte) -3};

private byte[] t = {(byte) 67, (byte) 72,(byte) 73,(byte) 78};

private String[] mDevices;
private String[] mBaudrates;
private int mDeviceIndex;
Expand Down Expand Up @@ -142,13 +145,15 @@ public void openState(SerialPortEnum serialPortEnum, File device, SerialStatus s
}
});

/* //多串口演示
//多串口演示
List<Driver> list2=new ArrayList<>();
//串口ttyS4
list2.add(new Driver("/dev/ttyUSB0", "115200"));
list2.add(new Driver("/dev/ttyUSB1", "115200"));
list2.add(new Driver("/dev/ttyS4", "115200"));
SerialUtils.getInstance().manyOpenSerialPort(list2);*/
list2.add(new Driver("/dev/ttyS2", "115200"));
// list2.add(new Driver("/dev/ttyS4", "115200"));
SerialUtils.getInstance().manyOpenSerialPort(list2);



binding.btnOpenDevice.setOnClickListener(v -> {
if (mOpened) {
Expand Down

0 comments on commit cd4bb33

Please sign in to comment.