diff --git a/lib/stringMsg.js b/lib/stringMsg.js index 80a5a5c..3d19727 100644 --- a/lib/stringMsg.js +++ b/lib/stringMsg.js @@ -45,7 +45,8 @@ function toPaddedHexString(num, len) { } // 2016-02-28T19:57:02.364Z,2,127250,7,255,8,ff,10,3b,ff,7f,ce,f5,fc -exports.isActisense = input => input.charAt(10) === 'T' && input.charAt(23) === 'Z' +exports.isActisense = input => (input.charAt(10) === 'T' && input.charAt(23) === 'Z') || (input.charAt(10) === '-' && input.charAt(23) === ',') + exports.parseActisense = (input) => { const [ timestamp, prio, pgn, src, dst, len, ...data ] = input.split(',') return buildMsg(