Skip to content

Conversation

@VishwanathB45
Copy link

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #[Issue]

Description

Precise description of the changes in this pull request

Alternative(s) considered

Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type

Type Choose one: (Bug fix | Feature | Documentation | Testing | Other)

Screenshots (if applicable)

Checklist

  • I have read the Contribution Guidelines
  • I have written Unit Tests
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach

2. Added 4 props in QR Reader module
 - tryHarder
 - saveQRImages
 - qrImagesPath
 - frameRotationCounter
3. Added loop test for QR module
Copy link
Collaborator

@kumaakh kumaakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this PR was going to have QRReader changed...
But I also see Logger changes...
What is the source of those changes ? have we updated the Logger from main branch ?
or are these changes needed on Main as well ?

Why is the target for PR the main branch ??
it should be tragetted to "v1.0_br" right ?

@VishwanathB45 VishwanathB45 changed the base branch from main to v1.0_br July 23, 2024 12:38
Copy link
Collaborator

@kumaakh kumaakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there

mFrameRotationCounter = _props.frameRotationCounter;
if(mFrameRotationCounter <= 0)
{
mFrameRotationCounter=1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a warning log here... the caller should not be setting a 0/negative and if we silently set it to 1 there is "hidden magic" happening. here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added warning log when user sets frameRotationCounter less than 1

Comment on lines 158 to 167
std::ofstream outFile(savePath.string(), std::ios::binary);
if (outFile)
{
outFile.write(static_cast<char*>(frame->data()), frame->size());
outFile.close();
}
else
{
LOG_ERROR << "Failed to save frame to " << savePath.string();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this block is poorly indented... and it confuses the reviewer. In general just using the built in code formatter in VScode/VS is enough here

Copy link
Collaborator

@kumaakh kumaakh Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if the savePath is not a good directory (eg non existing)... we will be gettting an std::exception thrown... which is not handled here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I have indented properly and also added trycatch block to handle exception

@kumaakh kumaakh merged commit ee28868 into Apra-Labs:v1.0_br Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants