Commit 5b0551633c03273f6ab69b39e9089aa2fa82fd7f
1 parent
9f1ae94c23
Exists in
master
Regex on writeToPortAndWaitForOkOrError
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
lib/modem-commands.js
... | ... | @@ -40,7 +40,7 @@ exports.writeToPortAndWaitForReadline = function writeToPortAndWaitForReadline(c |
40 | 40 | exports.writeToPortAndWaitForOkOrError = function writeToPortAndWaitForOkOrError(cmd, lockName) { |
41 | 41 | const parserName = 'customParserWaitForOkOrError'; |
42 | 42 | return new Promise(async (resolve) => { |
43 | - const parser = new ParserRegex({ regex: parsers.PARSER_WAIT_FOR_OK_OR_ERROR_REGEX }); | |
43 | + const parser = new ParserRegex({ regex: /(?:OK|ERROR)\r\n/ }); | |
44 | 44 | parser.on('data', (data) => { |
45 | 45 | logger.verbose('INCOMING', { parser: parserName, data: data.toString() }); |
46 | 46 | logger.verbose(`Unpiping ${parserName}`); |