Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lsongdev committed Nov 19, 2018
1 parent 6a37218 commit dc9f43e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ class DSensor extends SerialPort {
throw new TypeError('cmd must be a number or string');
if(typeof data === 'undefined')
throw new TypeError('data must be a number or string');
if(typeof cmd === 'string'){
cmd = COMMANDS[`${cmd}`.toUpperCase()];
}
cmd = parseInt(cmd);
data = parseInt(data);
const packet = Buffer.alloc(7);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsensor",
"version": "0.0.4",
"version": "0.0.5",
"main": "index.js",
"bin": {
"dsensor": "bin/dsensor"
Expand Down

0 comments on commit dc9f43e

Please sign in to comment.