Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FW logs bug. #12853

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Fix FW logs bug. #12853

merged 3 commits into from
Apr 15, 2024

Conversation

OhadMeir
Copy link
Contributor

Did not parse messages returned for the "start" HWMC, only parsed for the "update" HWMC.

Also the viewer parse the XML repeatedly, changed to parse only once when starting.

@OhadMeir OhadMeir requested a review from Nir-Az April 15, 2024 09:58
{
fwlogger.stop_collecting();

if( !enable_firmware_logs && fwlogger.get_number_of_fw_logs() == 0 )
Copy link
Collaborator

Choose a reason for hiding this comment

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

As I understand from the code, before if the user deactivate the log parsing, we continues dequeue until get_number_of_fw_logs() == 0
Now we will stop even we still have logs as our loop is while( enable_firmware_logs )
Is this change the required behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Get logs" HWM can return multiple log entries at once. Those entries are put in a queue. Subsequent calls to get_firmware_log don't send HWM, only deque the messages.
get_number_of_fw_logs() == 0 when the queue is empty, then we break the loop and call stop_collecting


void firmware_logger_device::HandleReceivedData( std::vector< uint8_t > & res )
Copy link
Collaborator

Choose a reason for hiding this comment

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

const?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added, and naming convention fixed

@Nir-Az Nir-Az merged commit 43133ff into IntelRealSense:development Apr 15, 2024
17 checks passed
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.

2 participants