mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-16 11:13:23 +00:00
move to new folder to prepare for other sennheiser series
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
const Channel = require('./channel');
|
||||
|
||||
exports.config = {
|
||||
defaultName: 'Sennheiser G Wireless',
|
||||
connectionType: 'UDPsocket',
|
||||
heartbeatInterval: 5000,
|
||||
heartbeatTimeout: 10000,
|
||||
defaultPort: 53212,
|
||||
mayChangePort: false,
|
||||
searchOptions: {
|
||||
type: 'UDPsocket',
|
||||
searchBuffer: Buffer.from('Name\r', 'ascii'),
|
||||
devicePort: 53212,
|
||||
listenPort: 53212,
|
||||
validateResponse(msg, info) {
|
||||
return msg.toString().includes('Name');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
exports.ready = function ready(_device) {
|
||||
const device = _device;
|
||||
|
||||
// send an immediate request for both types of attributes
|
||||
_device.send('Push 0 0 1');
|
||||
_device.send('Push 0 0 2');
|
||||
|
||||
device.data.channel = new Channel();
|
||||
};
|
||||
|
||||
exports.data = function data(_device, message) {
|
||||
console.log(message);
|
||||
// Parse return message
|
||||
};
|
||||
|
||||
exports.update = function update(device, doc, updateType, data) {};
|
||||
|
||||
exports.heartbeat = function heartbeat(device) {
|
||||
// tell unit to send both attribute updates every 500ms for 5 seconds
|
||||
device.send('Push 5 500 3');
|
||||
};
|
||||
Reference in New Issue
Block a user