Merge pull request #36 from nutki/pr-4
allow switching to mode 0 in Hub.subscribe()
This commit is contained in:
commit
3dc1076a88
@ -149,7 +149,7 @@ export class Hub extends EventEmitter {
|
||||
public subscribe (port: string, mode?: number) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let newMode = this._getModeForDeviceType(this._portLookup(port).type);
|
||||
if (mode) {
|
||||
if (mode !== undefined) {
|
||||
newMode = mode;
|
||||
}
|
||||
this._activatePortDevice(this._portLookup(port).value, this._portLookup(port).type, newMode, 0x00, () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user