|
@@ -86,8 +86,8 @@ public class RNSerialportModule extends ReactContextBaseJavaModule {
|
|
private int STOP_BIT = UsbSerialInterface.STOP_BITS_1;
|
|
private int STOP_BIT = UsbSerialInterface.STOP_BITS_1;
|
|
private int PARITY = UsbSerialInterface.PARITY_NONE;
|
|
private int PARITY = UsbSerialInterface.PARITY_NONE;
|
|
private int FLOW_CONTROL = UsbSerialInterface.FLOW_CONTROL_OFF;
|
|
private int FLOW_CONTROL = UsbSerialInterface.FLOW_CONTROL_OFF;
|
|
- private int FLOW_CONTROL_RTS_CTS = UsbSerialInterface.FLOW_CONTROL_RTS_CTS;
|
|
|
|
- private int FLOW_CONTROL_DSR_DTR = UsbSerialInterface.FLOW_CONTROL_DSR_DTR;
|
|
|
|
|
|
+ private boolean FLOW_CONTROL_RTS_CTS = UsbSerialInterface.FLOW_CONTROL_RTS_CTS;
|
|
|
|
+ private boolean FLOW_CONTROL_DSR_DTR = UsbSerialInterface.FLOW_CONTROL_DSR_DTR;
|
|
private int BAUD_RATE = 9600;
|
|
private int BAUD_RATE = 9600;
|
|
|
|
|
|
|
|
|
|
@@ -204,12 +204,12 @@ public class RNSerialportModule extends ReactContextBaseJavaModule {
|
|
this.FLOW_CONTROL = FLOW_CONTROL;
|
|
this.FLOW_CONTROL = FLOW_CONTROL;
|
|
}
|
|
}
|
|
@ReactMethod
|
|
@ReactMethod
|
|
- public void setRTS(int FLOW_CONTROL_RTS_CTS) {
|
|
|
|
|
|
+ public void setRTS(boolean FLOW_CONTROL_RTS_CTS) {
|
|
this.FLOW_CONTROL_RTS_CTS = FLOW_CONTROL_RTS_CTS;
|
|
this.FLOW_CONTROL_RTS_CTS = FLOW_CONTROL_RTS_CTS;
|
|
serialPort.setRTS(FLOW_CONTROL_RTS_CTS);
|
|
serialPort.setRTS(FLOW_CONTROL_RTS_CTS);
|
|
}
|
|
}
|
|
@ReactMethod
|
|
@ReactMethod
|
|
- public void setDTR(int FLOW_CONTROL_DSR_DTR) {
|
|
|
|
|
|
+ public void setDTR(boolean FLOW_CONTROL_DSR_DTR) {
|
|
this.FLOW_CONTROL_DSR_DTR = FLOW_CONTROL_DSR_DTR;
|
|
this.FLOW_CONTROL_DSR_DTR = FLOW_CONTROL_DSR_DTR;
|
|
serialPort.setDTR(FLOW_CONTROL_DSR_DTR);
|
|
serialPort.setDTR(FLOW_CONTROL_DSR_DTR);
|
|
}
|
|
}
|