Removed
This commit is contained in:
@@ -14,7 +14,7 @@ android {
|
|||||||
namespace 'in.sminnovations.hpostesting'
|
namespace 'in.sminnovations.hpostesting'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "in.sminnovations.hpostesting.prod"
|
applicationId "in.sminnovations.hpostesting"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 2
|
versionCode 2
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ class UsbService : Service() {
|
|||||||
private val TAG = "UsbService"
|
private val TAG = "UsbService"
|
||||||
|
|
||||||
inner class UsbServiceBinder : Binder() {
|
inner class UsbServiceBinder : Binder() {
|
||||||
// Return this instance of UsbService so clients can call public methods
|
|
||||||
fun getService(): UsbService = this@UsbService
|
fun getService(): UsbService = this@UsbService
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,14 +38,12 @@ class UsbService : Service() {
|
|||||||
mPort = driver.ports[0] // Most devices have just one port (port 0)
|
mPort = driver.ports[0] // Most devices have just one port (port 0)
|
||||||
mPort.open(connection)
|
mPort.open(connection)
|
||||||
mPort.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE)
|
mPort.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE)
|
||||||
//
|
|
||||||
isUsbConnected = true
|
isUsbConnected = true
|
||||||
Log.d(TAG, "My Usb Connected ${mPort.driver}")
|
Log.d(TAG, "My Usb Connected ${mPort.driver}")
|
||||||
|
|
||||||
val usbIoManager = SerialInputOutputManager(mPort,
|
val usbIoManager = SerialInputOutputManager(mPort,
|
||||||
object : SerialInputOutputManager.Listener{
|
object : SerialInputOutputManager.Listener{
|
||||||
override fun onNewData(data: ByteArray?) {
|
override fun onNewData(data: ByteArray?) {
|
||||||
// Log.e(TAG, "onNewData() called inside eventDrivenWrite()")
|
|
||||||
listener?.onUsbRead(data)
|
listener?.onUsbRead(data)
|
||||||
}
|
}
|
||||||
override fun onRunError(e: Exception?) {
|
override fun onRunError(e: Exception?) {
|
||||||
|
|||||||
Reference in New Issue
Block a user