allow switching to mode 0

This commit is contained in:
Michal Szafranski 2019-11-02 10:36:06 +01:00
parent 9a9d3ee4d5
commit 98f1ca84b0

View File

@ -149,7 +149,7 @@ export class Hub extends EventEmitter {
public subscribe (port: string, mode?: number) { public subscribe (port: string, mode?: number) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let newMode = this._getModeForDeviceType(this._portLookup(port).type); let newMode = this._getModeForDeviceType(this._portLookup(port).type);
if (mode) { if (mode !== undefined) {
newMode = mode; newMode = mode;
} }
this._activatePortDevice(this._portLookup(port).value, this._portLookup(port).type, newMode, 0x00, () => { this._activatePortDevice(this._portLookup(port).value, this._portLookup(port).type, newMode, 0x00, () => {