Skip to content

Commit

Permalink
fix(serial): add missing options for the open method (#1844)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesjos authored and ihadeed committed Aug 23, 2017
1 parent 7c1b409 commit 1acade4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/@ionic-native/plugins/serial/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export interface SerialPermissionOptions {

export interface SerialOpenOptions {
baudRate: number;
dataBits: number;
stopBits: number;
parity: number;
dtr: boolean;
rts: boolean;
sleepOnPause: boolean;
}

/**
Expand All @@ -29,7 +35,13 @@ export interface SerialOpenOptions {
*
* this.serial.requestPermission().then(() => {
* this.serial.open({
* baudRate: 9800
* baudRate: 9800,
* dataBits: 4,
* stopBits: 1,
* parity: 0,
* dtr: true,
* rts: true,
* sleepOnPause: false
* }).then(() => {
* console.log('Serial connection opened');
* });
Expand Down

0 comments on commit 1acade4

Please sign in to comment.