Skip to content

Commit

Permalink
Bugfix/(nut tree/plugin ocr#25)/default confidence (#544)
Browse files Browse the repository at this point in the history
* (nut-tree/plugin-ocr#25) Made the confidence value of a match request optional

* (nut-tree/plugin-ocr#25) Stop setting a default confidence value to not override other confidence value (e.g. the OCR one) with the explicit value of the match request

* (nut-tree/plugin-ocr#25) Removed redefinition of sleep and used import

* (nut-tree/plugin-ocr#25) Updated workflow definitions

* (nut-tree/plugin-ocr#25) Run npx playwright install before running tests

* (nut-tree/plugin-ocr#25) Specify working directory where to load the Electron main from in window tests

* (nut-tree/plugin-ocr#25) Increased Jest timeout for window tests to accommodate startup times, removed superfluous Docker stuf from CI runs on macOS and Windows, since tests would be running in Linux again which is just confusing in this place

* (nut-tree/plugin-ocr#25) Formatting
  • Loading branch information
s1hofmann committed Dec 12, 2023
1 parent 820a0b9 commit 41b7b29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/match-request.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export function createMatchRequest<PROVIDER_DATA_TYPE>(
.info(
`Searching for image ${
needle.id
} in region ${searchRegion.toString()}. Required confidence: ${minMatch}`,
} in region ${searchRegion.toString()}.${
minMatch != null ? ` Required confidence: ${minMatch}` : ""
}`,
);

return new MatchRequest(
Expand All @@ -93,7 +95,11 @@ export function createMatchRequest<PROVIDER_DATA_TYPE>(
providerRegistry.getLogProvider().info(
`Searching for ${isLineQuery(needle) ? "line" : "word"} {
${isLineQuery(needle) ? needle.by.line : needle.by.word}
} in region ${searchRegion.toString()}. Required confidence: ${minMatch}`,
} in region ${searchRegion.toString()}.${
minMatch != null
? ` Required confidence: ${minMatch}`
: ""
}`,
);

return new MatchRequest(
Expand Down

0 comments on commit 41b7b29

Please sign in to comment.