|
|
|
@ -20,7 +20,7 @@ class PlatformSerialPortHelper : ISerialPortHelper<SerialPort> {
|
|
|
|
|
mSerialPort = LztekUtil.getLztek()?.openSerialPort(portPath, baudrate)
|
|
|
|
|
return mSerialPort
|
|
|
|
|
} catch (e: IOException) {
|
|
|
|
|
e.printStackTrace()
|
|
|
|
|
// e.printStackTrace()
|
|
|
|
|
Log.e("SerialPortHelper", "open port error; " + e.message)
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
@ -38,7 +38,7 @@ class PlatformSerialPortHelper : ISerialPortHelper<SerialPort> {
|
|
|
|
|
try {
|
|
|
|
|
mSerialPort?.close()
|
|
|
|
|
} catch (e: Exception) {
|
|
|
|
|
e.printStackTrace()
|
|
|
|
|
// e.printStackTrace()
|
|
|
|
|
Log.e("SerialPortHelper", "closePort error; " + e.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|