|
@@ -404,19 +404,6 @@ public class RNSerialportModule extends ReactContextBaseJavaModule {
|
|
|
serialPort.write(bytes);
|
|
|
}
|
|
|
|
|
|
- @ReactMethod
|
|
|
- public void write(ArrayBuffer bytes) {
|
|
|
- if(!usbServiceStarted){
|
|
|
- eventEmit(onErrorEvent, createError(Definitions.ERROR_USB_SERVICE_NOT_STARTED, Definitions.ERROR_USB_SERVICE_NOT_STARTED_MESSAGE));
|
|
|
- return;
|
|
|
- }
|
|
|
- if(!serialPortConnected || serialPort == null) {
|
|
|
- eventEmit(onErrorEvent, createError(Definitions.ERROR_THERE_IS_NO_CONNECTION, Definitions.ERROR_THERE_IS_NO_CONNECTION_MESSAGE));
|
|
|
- return;
|
|
|
- }
|
|
|
- serialPort.write(bytes);
|
|
|
- }
|
|
|
-
|
|
|
@ReactMethod
|
|
|
public void writeString(String message) {
|
|
|
if(!usbServiceStarted){
|