altera2015 / usbserial

Flutter Android USB Serial plugin
BSD 3-Clause "New" or "Revised" License
124 stars 83 forks source link

Add support for parity even #4

Closed Salabasti closed 5 years ago

Salabasti commented 5 years ago

In usb_serial version 0.1.1 there seems to be no constant for setting the parity of a UsbPort object to 'even'.

I explored the underlying java library and noticed that this option is supported there. (link) I tried using '2' as a constant for setting the parity in UsbPort.setPortParameters() with no success. EDIT: Passing 2 in UsbPort.setParameters(...) worked for me.

Will the option to set the parity to 'even' be available in the near future or is there any workaround for that?

altera2015 commented 5 years ago

I've added the 'Even' constant in 0.2.0

Salabasti commented 5 years ago

Using an Integer value of 2 seems also to work for setting the parity argument to 'even'.

Salabasti commented 5 years ago

I've added the 'Even' constant in 0.2.0

Thank you very much!