Skip to content

Commit 345d3fe

Browse files
stampy88milesight-sway
authored andcommitted
Declare global variables
- needed to add the `var` declaration for the 6 existing variables so this decoder doesn't have any problems when run in strict mode.
1 parent 211df84 commit 345d3fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

VS_Series/VS13x/VS13x_Decoder.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ function Decoder(bytes, port) {
2323
return milesightDeviceDecode(bytes);
2424
}
2525

26-
total_in_chns = [0x03, 0x06, 0x09, 0x0c];
27-
total_out_chns = [0x04, 0x07, 0x0a, 0x0d];
28-
period_chns = [0x05, 0x08, 0x0b, 0x0e];
29-
child_total_in_chns = [0x11, 0x14, 0x17, 0x1a];
30-
child_total_out_chns = [0x12, 0x15, 0x18, 0x1b];
31-
child_period_chns = [0x13, 0x16, 0x19, 0x1c];
26+
var total_in_chns = [0x03, 0x06, 0x09, 0x0c];
27+
var total_out_chns = [0x04, 0x07, 0x0a, 0x0d];
28+
var period_chns = [0x05, 0x08, 0x0b, 0x0e];
29+
var child_total_in_chns = [0x11, 0x14, 0x17, 0x1a];
30+
var child_total_out_chns = [0x12, 0x15, 0x18, 0x1b];
31+
var child_period_chns = [0x13, 0x16, 0x19, 0x1c];
3232

3333
function milesightDeviceDecode(bytes) {
3434
var decoded = {};

0 commit comments

Comments
 (0)