We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a0734c commit df124fdCopy full SHA for df124fd
app/modules/playcode.js
@@ -244,13 +244,18 @@ ff 55 idx size data a
244
Module.prototype.handleLocalData = function(data) {
245
var key;
246
var value;
247
+ var base_idx;
248
var self = this;
249
250
console.log('HW Received...');
251
252
for (var i = 0; i < 3; i++) {
- key = (data[i * 2] & 0x78) >> 3;
253
- value = ((data[i * 2] & 0x07) << 7) | (data[i * 2 + 1] & 0x7f);
+ base_idx = i * 3;
254
+ key = data[base_idx];
255
+ value = data[base_idx + 1] & 0x000000ff | (data[base_idx + 2] << 8) & 0x0000ff00;
256
+
257
+ //key = (data[i * 2] & 0x78) >> 3;
258
+ //value = ((data[i * 2] & 0x07) << 7) | (data[i * 2 + 1] & 0x7f);
259
260
console.log('[' + key + '] = ' + value);
261
0 commit comments