Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Buffer Constructor depreciated use #66

Merged
merged 1 commit into from
Mar 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions alexa-wsmqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AlexaWsMqtt extends EventEmitter {
}, 30000);

// tell Tuning Service that we support "A:H" protocol = AlphaPrococol
const msg = new Buffer('0x99d4f71a 0x0000001d A:HTUNE');
const msg = Buffer.from('0x99d4f71a 0x0000001d A:HTUNE');
//console.log('SEND: ' + msg.toString('ascii'));
this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Initialization Msg 1 sent');
this.websocket.send(msg);
Expand Down Expand Up @@ -138,7 +138,7 @@ class AlexaWsMqtt extends EventEmitter {
else {
this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Unexpected Response: ' + JSON.stringify(message));
}
let msg = new Buffer('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE');
let msg = Buffer.from('0xa6f6a951 0x0000009c {"protocolName":"A:H","parameters":{"AlphaProtocolHandler.receiveWindowSize":"16","AlphaProtocolHandler.maxFragmentSize":"16000"}}TUNE');
//console.log('SEND: ' + msg.toString('ascii'));
this.websocket.send(msg);
//msg = new Buffer('MSG 0x00000361 0x0e414e45 f 0x00000001 0xd7c62f29 0x0000009b INI 0x00000003 1.0 0x00000024 ff1c4525-c036-4942-bf6c-a098755ac82f 0x00000164d106ce6b END FABE');
Expand Down