configure() logs "Detection interval" at INFO on every call, even when unchanged

Open Beginner friendly
#114 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

Start by reading ARToolKitNFTCore::configure() and setDetectionInterval() to trace how the resolved interval is applied and logged. Check the other setters reached by configure() for similar logging, as the issue suggests. Done means repeated calls with unchanged settings no longer emit these INFO messages, while changed settings still apply and log.

Written by the indexing model from the issue text.

Description

Problem

ARToolKitNFTCore::configure() calls setDetectionInterval(interval) on every call. That function logs "Detection interval: … ms" at INFO, even when the interval did not change. A consumer that calls configure() often at the default level, for example jsartoolkitNFT's configure(patch) for a single field, prints a line every time.

Fix

In configure(), apply the interval (and log) only when the resolved interval differs from the stored one. Or move the log line out of the path that configure() shares with the setter. The other setters configure() reaches deserve the same check, for example the filtering and continuous-detection messages, if they log.

To be bundled with #107, #110, #111 and #113 in 0.12.1.

Found in the final review of jsartoolkitNFT's #720 project 1 branch.

Dominant language
C++
Stars
21
Forks
8
Avg merge
3h 42m
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from webarkit/WebARKitLib

All issues in webarkit/WebARKitLib

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.