|
@@ -392,7 +392,7 @@ public class RNSerialportModule extends ReactContextBaseJavaModule {
|
|
|
}
|
|
|
|
|
|
@ReactMethod
|
|
|
- public void writeBytes(byte[] bytes) {
|
|
|
+ public void writeBytes(byte[] buffer) {
|
|
|
if(!usbServiceStarted){
|
|
|
eventEmit(onErrorEvent, createError(Definitions.ERROR_USB_SERVICE_NOT_STARTED, Definitions.ERROR_USB_SERVICE_NOT_STARTED_MESSAGE));
|
|
|
return;
|
|
@@ -401,7 +401,7 @@ public class RNSerialportModule extends ReactContextBaseJavaModule {
|
|
|
eventEmit(onErrorEvent, createError(Definitions.ERROR_THERE_IS_NO_CONNECTION, Definitions.ERROR_THERE_IS_NO_CONNECTION_MESSAGE));
|
|
|
return;
|
|
|
}
|
|
|
- serialPort.write(bytes);
|
|
|
+ serialPort.write(buffer);
|
|
|
}
|
|
|
|
|
|
@ReactMethod
|