smallest refactoring

This commit is contained in:
rusefillc 2021-12-04 17:27:01 -05:00
parent fbd203fff2
commit 18683e35eb
1 changed files with 2 additions and 1 deletions

View File

@ -248,7 +248,8 @@ public class Elm327Connector implements Closeable {
}
// return the response only if it matches the given regexp
Pattern pattern = Pattern.compile(responseFilter);
Matcher matcher = pattern.matcher(this.completeLines.get(responseIdx));
String inputLine = completeLines.get(responseIdx);
Matcher matcher = pattern.matcher(inputLine);
if (matcher.find()) {
// store the echo mode
//this.waitForEcho = responseIdx != 0;